-
Notifications
You must be signed in to change notification settings - Fork 150
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[linux] Combat messages show %s character #162
Comments
Can confirm the bug in Windows too. |
And MacOS |
From my PR #185 there were atleast 2 snprintf calls that did not provide the format specifier. I wonder if there are more missing/incorrect specifiers in the code |
Thanks! From a quick search for sprintf, I think obj_examine_func is the relevant function. |
obj_examine_func():408-424 has a redundant format specifier. v66 provides a "%s %s" format specifier for objects v63 && hpMessageListItem, however v63 already provides a format specifier in the form of "GENDER looks: %s" for use by hpMessageListItem. Technically the most correct fix is to use v63 to create a secondary format specifier like how src/game/protinst.cc:314 does it, However it is my belief that this will cause a regression if the target is not crippled because MSG_ID 521 is "%s %s." which will append a secondary period onto the end of the string. Modifed obj_examine_func() comments for added clarity
obj_examine_func():408-424 has a redundant format specifier. v66 provides a "%s %s" format specifier for objects v63 && hpMessageListItem, however v63 already provides a format specifier in the form of "GENDER looks: %s" for use by hpMessageListItem. Technically the most correct fix is to use v63 to create a secondary format specifier like how src/game/protinst.cc:314 does it, However it is my belief that this will cause a regression if the target is not crippled because MSG_ID 521 is "%s %s." which will append a secondary period onto the end of the string. Modifed obj_examine_func() comments for added clarity
I have merged this PR (and several others for bug fixes) into my git repo for those who are interested. You will be required to compile it yourself as I dont want to setup github CI for this |
When attacking the cave rats at the beginning of the game it shows the message "She looks: %s. Unhurt." It seems like "Unhurt" is supposed to replace the "%s" there. After attacking the rats once it changes to "She looks: %s. Wounded." Attacking some lesser mole rats later on I get the same message. I've searched but I haven't had any luck finding any mention of anyone else experiencing this issue.
The text was updated successfully, but these errors were encountered: