vaccinewars

be a doctor and try to vaccinate the world
git clone git://src.adamsgaard.dk/vaccinewars # fast
git clone https://src.adamsgaard.dk/vaccinewars.git # slow
Log | Files | Refs | README | LICENSE Back to index

commit ea69921cfddd9b707971f51457627a9052b7e906
parent ea8800fdfb949fb2b4516d11daac56e4e9a16adc
Author: Ben Webb <ben@salilab.org>
Date:   Sat,  7 Nov 2020 21:04:42 -0800

Add cast to quiet a compiler warning

Windows registry functions technically take
unsigned char* but we're passing char*, so the
compiler will warn. Add an explicit cast.

Diffstat:
Msrc/serverside.c | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/serverside.c b/src/serverside.c @@ -1934,7 +1934,7 @@ static FILE *OpenHighScoreAppData(int *error, gboolean *empty) if (RegQueryValueEx(key, subval, NULL, &keytype, NULL, &keylen) == ERROR_SUCCESS && keytype == REG_SZ) { char *keyval = g_malloc(keylen); - if (RegQueryValueEx(key, subval, NULL, &keytype, keyval, + if (RegQueryValueEx(key, subval, NULL, &keytype, (LPBYTE)keyval, &keylen) == ERROR_SUCCESS) { GString *str = g_string_sized_new(keylen + 40); g_string_assign(str, keyval);