Skip to content

Commit 28f7afd

Browse files
authored
[CORE] Fix logging in wwdebugstub (#737)
1 parent 0f097b2 commit 28f7afd

File tree

1 file changed

+7
-9
lines changed

1 file changed

+7
-9
lines changed

Core/Libraries/Source/WWVegas/WWStub/wwdebugstub.cpp

+7-9
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
22
** Command & Conquer Generals Zero Hour(tm)
3-
** Copyright 2025 TheSuperHackers
3+
** Copyright 2025 TheSuperHackers
44
**
55
** This program is free software: you can redistribute it and/or modify
66
** it under the terms of the GNU General Public License as published by
@@ -30,13 +30,12 @@ char* TheCurrentIgnoreCrashPtr = NULL;
3030
void DebugLog(const char *format, ...)
3131
{
3232
// Print it to the console
33-
char theBuffer[8192];
3433

3534
va_list arg;
3635
va_start(arg, format);
37-
vsprintf(theBuffer, format, arg);
36+
vprintf(format, arg);
3837
va_end(arg);
39-
}
38+
}
4039

4140
#endif
4241

@@ -45,14 +44,13 @@ void DebugLog(const char *format, ...)
4544
void DebugCrash(const char *format, ...)
4645
{
4746
// Print it to the console
48-
char theCrashBuffer[8192];
47+
4948
va_list arg;
5049
va_start(arg, format);
51-
vsprintf(theCrashBuffer, format, arg);
50+
vprintf(format, arg);
5251
va_end(arg);
5352

54-
// Quit
55-
exit(EXIT_FAILURE);
53+
// No exit in this stub
5654
}
5755

58-
#endif
56+
#endif

0 commit comments

Comments
 (0)