Author: cazfi
Date: Fri May  5 07:51:31 2017
New Revision: 35398

URL: http://svn.gna.org/viewcvs/freeciv?rev=35398&view=rev
Log:
Fix comparison between pointer and zero character

See hrm Bug #657309

Modified:
    branches/S2_5/client/gui-sdl/gui_string.c

Modified: branches/S2_5/client/gui-sdl/gui_string.c
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_5/client/gui-sdl/gui_string.c?rev=35398&r1=35397&r2=35398&view=diff
==============================================================================
--- branches/S2_5/client/gui-sdl/gui_string.c   (original)
+++ branches/S2_5/client/gui-sdl/gui_string.c   Fri May  5 07:51:31 2017
@@ -93,13 +93,13 @@
 SDL_Rect str16size(SDL_String16 *pString16)
 {
   SDL_Rect Ret = {0, 0, 0, 0};
-  
-  if (pString16 && pString16->text && pString16->text != '\0') {
+
+  if (pString16 && pString16->text && pString16->text[0] != '\0') {
     Uint16 *pStr16 = pString16->text;
     Uint16 c = *pStr16;
     bool new_line = FALSE;
     int w, h;
-    
+
     /* find '\n' */
     while (c != '\0') {
       if (c == 10) {


_______________________________________________
Freeciv-commits mailing list
Freeciv-commits@gna.org
https://mail.gna.org/listinfo/freeciv-commits

Reply via email to