diff options
author | Ash Wolf <ninji@wuffs.org> | 2023-07-01 23:04:04 +0100 |
---|---|---|
committer | Ash Wolf <ninji@wuffs.org> | 2023-07-01 23:04:04 +0100 |
commit | c2efba6907fab934a04959b9bb644cf7141cc955 (patch) | |
tree | c047244f99870e44a7a5d7e733c2857434c03765 /src/T2DLL/T2InfoDialog.cpp | |
parent | 1eb8da84d77d0c865623421069ec38bfc7b0d461 (diff) | |
download | t2win-c2efba6907fab934a04959b9bb644cf7141cc955.tar.gz t2win-c2efba6907fab934a04959b9bb644cf7141cc955.zip |
matched T2DLL as well as i can
Diffstat (limited to '')
-rw-r--r-- | src/T2DLL/T2InfoDialog.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
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 = "調整中です。"; } |