Explorar o código

Review issue sscanf() and hex value #78

raysan5 %!s(int64=5) %!d(string=hai) anos
pai
achega
b2974f3d28
Modificáronse 1 ficheiros con 2 adicións e 2 borrados
  1. 2 2
      src/raygui.h

+ 2 - 2
src/raygui.h

@@ -2943,7 +2943,7 @@ void GuiLoadStyle(const char *fileName)
         {
         {
             int controlId = 0;
             int controlId = 0;
             int propertyId = 0;
             int propertyId = 0;
-            int propertyValue = 0;
+            unsigned int propertyValue = 0;
 
 
             while (!feof(rgsFile))
             while (!feof(rgsFile))
             {
             {
@@ -2955,7 +2955,7 @@ void GuiLoadStyle(const char *fileName)
 
 
                         sscanf(buffer, "p %d %d 0x%x", &controlId, &propertyId, &propertyValue);
                         sscanf(buffer, "p %d %d 0x%x", &controlId, &propertyId, &propertyValue);
 
 
-                        GuiSetStyle(controlId, propertyId, propertyValue);
+                        GuiSetStyle(controlId, propertyId, (int)propertyValue);
 
 
                     } break;
                     } break;
                     case 'f':
                     case 'f':