one less incompatibility with c89

This commit is contained in:
UnknownShadow200 2020-10-07 00:10:26 +11:00
parent 6b8a9cc1e3
commit 18dcbd710f
2 changed files with 5 additions and 7 deletions

View File

@ -205,13 +205,11 @@ void Platform_Log(const char* msg, int len) {
WriteFile(conHandle, msg, len, &wrote, NULL); WriteFile(conHandle, msg, len, &wrote, NULL);
WriteFile(conHandle, "\n", 1, &wrote, NULL); WriteFile(conHandle, "\n", 1, &wrote, NULL);
} }
if (!hasDebugger) return; if (!hasDebugger) return;
len = min(len, 2048); len = min(len, 2048);
Mem_Copy(tmp, msg, len); Mem_Copy(tmp, msg, len); tmp[len] = '\0';
tmp[len] = '\0';
/* TODO: This reads past the end of the buffer */
OutputDebugStringA(tmp); OutputDebugStringA(tmp);
OutputDebugStringA("\n"); OutputDebugStringA("\n");
} }
@ -263,8 +261,7 @@ void Platform_Log(const char* msg, int len) {
char tmp[2048 + 1]; char tmp[2048 + 1];
len = min(len, 2048); len = min(len, 2048);
Mem_Copy(tmp, msg, len); Mem_Copy(tmp, msg, len); tmp[len] = '\0';
tmp[len] = '\0';
__android_log_write(ANDROID_LOG_DEBUG, "ClassiCube", tmp); __android_log_write(ANDROID_LOG_DEBUG, "ClassiCube", tmp);
} }
#else #else

View File

@ -1028,10 +1028,11 @@ static void ChatScreen_BuildMesh(void* screen) { }
static void ChatScreen_Layout(void* screen) { static void ChatScreen_Layout(void* screen) {
struct ChatScreen* s = (struct ChatScreen*)screen; struct ChatScreen* s = (struct ChatScreen*)screen;
int yOffset;
/* See comment in ChatScreen_UpdateChatYOffsets */ /* See comment in ChatScreen_UpdateChatYOffsets */
HUDScreen_Layout(Gui_HUD); HUDScreen_Layout(Gui_HUD);
int yOffset = Gui_HUD->hotbar.height + 15; /* TODO: This should be DPI scaled?? */ yOffset = Gui_HUD->hotbar.height + 15; /* TODO: This should be DPI scaled?? */
if (ChatScreen_ChatUpdateFont(s)) ChatScreen_Redraw(s); if (ChatScreen_ChatUpdateFont(s)) ChatScreen_Redraw(s);
s->paddingX = Display_ScaleX(5); s->paddingX = Display_ScaleX(5);