MQ2HUD garbage/crash
Posted: Sat Jun 03, 2017 2:28 pm
This never crashed on older windows, but I did get garbage on screen sometimes. I do get crashes on Win10 sometimes though. Bsically, the PreParsed text is never zeroed and sometimes you can display the uninitialized data.
Shouldn't really matter where it's put, just stuck it at the bottom 
Code: Select all
--- a/MQ2HUD/MQ2HUD.cpp Wed Feb 15 11:36:06 2017
+++ b/MQ2HUD/MQ2HUD.cpp Tue Mar 28 00:39:11 2017
@@ -144,6 +144,7 @@
pElement->Y=Y;
strcpy_s(pElement->Text,IniString);
pElement->Size=Size;
+ ZeroMemory(pElement->PreParsed, sizeof(pElement->PreParsed));
DebugSpew("New element '%s' in color %X",pElement->Text,pElement->Color);
}