Skip to content

Commit 7f0d74b

Browse files
author
Bart Roossien
committed
[ZH] Fixed warning messages related to incorrect string formatting (TheSuperHackers#534)
1 parent 6c7966a commit 7f0d74b

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

GeneralsMD/Code/Libraries/Source/WWVegas/WWLib/Except.cpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -676,17 +676,17 @@ void Dump_Exception_Info(EXCEPTION_POINTERS *e_info)
676676
/*
677677
** The stack contents cannot be read so just print up question marks.
678678
*/
679-
sprintf(scrap, "%08X: ", stackptr);
679+
sprintf(scrap, "%p: ", (void*)stackptr);
680680
strcat(scrap, "????????\r\n");
681681
} else {
682682
/*
683683
** If this stack address is in our memory space then try to match it with a code symbol.
684684
*/
685685
if (IsBadCodePtr((FARPROC)*stackptr)) {
686-
sprintf(scrap, "%08X: %08X ", stackptr, *stackptr);
686+
sprintf(scrap, "%p: %08lX ", (void*)stackptr, *stackptr);
687687
strcat(scrap, "DATA_PTR\r\n");
688688
} else {
689-
sprintf(scrap, "%08X: %08X", stackptr, *stackptr);
689+
sprintf(scrap, "%p: %08lX", (void*)stackptr, *stackptr);
690690

691691
if (symbols_available) {
692692
symptr->SizeOfStruct = sizeof(symbol);

GeneralsMD/Code/Libraries/Source/WWVegas/WWLib/ini.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -1561,7 +1561,7 @@ double INIClass::Get_Double(char const * section, char const * entry, double def
15611561

15621562
INIEntry * entryptr = Find_Entry(section, entry);
15631563
if (entryptr != NULL && entryptr->Value != NULL) {
1564-
float val = defvalue;
1564+
double val = defvalue;
15651565
sscanf(entryptr->Value, "%lf", &val);
15661566
defvalue = val;
15671567
if (strchr(entryptr->Value, '%') != NULL) {

0 commit comments

Comments
 (0)