1
0
mirror of https://github.com/Drezil/imgui.git synced 2024-12-21 07:16:34 +00:00

Merge pull request from ocornut/master

GCC warning fix
This commit is contained in:
Jarrett Billingsley 2014-10-26 12:22:27 -07:00
commit 4c4798546e

View File

@ -4645,11 +4645,13 @@ bool ColorEdit4(const char* label, float col[4], bool alpha)
char* p = buf; char* p = buf;
while (*p == '#' || *p == ' ' || *p == '\t') while (*p == '#' || *p == ' ' || *p == '\t')
p++; p++;
// Treat at unsigned (%X is unsigned)
ix = iy = iz = iw = 0; ix = iy = iz = iw = 0;
if (alpha) if (alpha)
sscanf(p, "%02X%02X%02X%02X", &ix, &iy, &iz, &iw); sscanf(p, "%02X%02X%02X%02X", (unsigned int*)&ix, (unsigned int*)&iy, (unsigned int*)&iz, (unsigned int*)&iw);
else else
sscanf(p, "%02X%02X%02X", &ix, &iy, &iz); sscanf(p, "%02X%02X%02X", (unsigned int*)&ix, (unsigned int*)&iy, (unsigned int*)&iz);
} }
break; break;
} }