From 28e164cfba84360e45eb2ea07a8fb009c7894dcd Mon Sep 17 00:00:00 2001 From: Allanis Date: Tue, 9 Apr 2013 00:23:47 +0100 Subject: [PATCH] [Fix] Exterminating the bugs. Sorted invalid char generated with tab escape sequence. --- src/font.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/font.c b/src/font.c index 05c5d81..3eef7c6 100644 --- a/src/font.c +++ b/src/font.c @@ -229,6 +229,10 @@ int gl_printText(const glFont* ft_font, const int width, const int height, m = 0; if(lastspace == -1) lastspace = 0; 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]]; if(m > width) break; buf[j] = txt[p+j+1];