Skip to content
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

Macro Triggers can't be translated back into ascii codes #1288

Closed
flambard-took opened this issue May 30, 2019 · 0 comments
Closed

Macro Triggers can't be translated back into ascii codes #1288

flambard-took opened this issue May 30, 2019 · 0 comments

Comments

@flambard-took
Copy link
Member

After #1231, a bug in #859 got exposed. Reported on the forum and discord by Sinclair/ema. Read/writing macro files is completely broken in 1.5.1.

With trigger templates, when the pref file is written (i.e. %, 2) Save file, user-prf.win) the macro triggers are dumped with their human-readable names (\[F1]), not the ascii codes (^_x3B\r).

When such file is loaded, those should be transformed back into ascii, but they actually aren't, due to bug: we are not giving macro_trigger_text_to_ascii() the correct buffer length, we don't actually know the buffer length, because it should come to us as an argument to text_to_ascii call, and that doesn't happen.

In Angband (since at least 3.0.5), text_to_ascii interface accepts the buffer length argument, so I'm just going to use the same fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant