fix empty strings
authorFelix Domke <tmbinc@elitedvb.net>
Sun, 18 Jun 2006 21:10:11 +0000 (21:10 +0000)
committerFelix Domke <tmbinc@elitedvb.net>
Sun, 18 Jun 2006 21:10:11 +0000 (21:10 +0000)
lib/gdi/font.cpp

index f7c1bca..77c8de9 100644 (file)
@@ -470,9 +470,9 @@ int eTextPara::renderString(const char *string, int rflags)
        if (string)
                uc_string.reserve(strlen(string));
        
        if (string)
                uc_string.reserve(strlen(string));
        
-       const char *p = string;
+       const char *p = string ? string : "";
 
 
-       while(p)
+       while (*p)
        {
                unsigned int unicode=(unsigned char)*p++;
 
        {
                unsigned int unicode=(unsigned char)*p++;