[Fix] Exterminating the bugs. Sorted invalid char generated with tab escape sequence.

This commit is contained in:
Allanis 2013-04-09 00:23:47 +01:00
parent 6a320a27b1
commit 28e164cfba

View File

@ -229,6 +229,10 @@ int gl_printText(const glFont* ft_font, const int width, const int height,
m = 0; m = 0;
if(lastspace == -1) lastspace = 0; if(lastspace == -1) lastspace = 0;
for(j = 0; j < (lastspace-p-1); j++) { for(j = 0; j < (lastspace-p-1); j++) {
if(txt[p+j+1]=='\t') {
p++;
continue;
}
m += ft_font->w[(int)txt[p+j+1]]; m += ft_font->w[(int)txt[p+j+1]];
if(m > width) break; if(m > width) break;
buf[j] = txt[p+j+1]; buf[j] = txt[p+j+1];