From c2efba6907fab934a04959b9bb644cf7141cc955 Mon Sep 17 00:00:00 2001 From: Ash Wolf Date: Sat, 1 Jul 2023 23:04:04 +0100 Subject: matched T2DLL as well as i can --- src/T2DLL/T2InfoDialog.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'src/T2DLL/T2InfoDialog.cpp') diff --git a/src/T2DLL/T2InfoDialog.cpp b/src/T2DLL/T2InfoDialog.cpp index 60ba8e8..8f9b155 100644 --- a/src/T2DLL/T2InfoDialog.cpp +++ b/src/T2DLL/T2InfoDialog.cpp @@ -11,20 +11,20 @@ T2InfoDialog::T2InfoDialog(T2DrawableObject* object) { } /*virtual*/ void T2InfoDialog::GetCommentString(unsigned int id, CString& outStr) const { - char buf[256]; - int size = 256; - HINSTANCE hInstance = NULL; + int bufLen = 256; + HINSTANCE theInstance = NULL; + char buffer[256]; if (id < 0x10000001) { - hInstance = AfxGetInstanceHandle(); + theInstance = AfxGetInstanceHandle(); } else { - hInstance = ((T2Equip *) mObject)->GetEquipDef()->GetModuleHandle(); + theInstance = ((T2Equip *) mObject)->GetEquipDef()->GetModuleHandle(); id -= 0x10000001; } - int result = LoadString(hInstance, id + 1023, buf, size); - if (result) - outStr = buf; + int len = LoadString(theInstance, id + 1023, buffer, bufLen); + if (len) + outStr = buffer; else outStr = "調整中です。"; } -- cgit v1.2.3