-
-
Notifications
You must be signed in to change notification settings - Fork 415
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
Fix #1443 - trim teaEncode trailing zeroes #1534
Conversation
I can't connect to my 1.5.6 server, for some stupid reason(a resource sets min client version, and I cant figure out which one) Please, could someone run a few tests, and post the results here on 1.5.6 server and client? Test values:
They key can be anything. Let it be.. "c++20" |
@Pirulax mtaserver.conf:
Edit: Oh a resource sets it - Nevermind |
btw, the problem is that, now I've fixed |
Btw, since the old one used |
Actually, I'm not sure if it was a resource. I think this'll help, thanks! |
New resource to test: utf1443.zip |
We need to fix the padding in teaEncode, because with binary files 0's at the file end is totally acceptable. |
Perhaps, maybe add a noTrim argument? |
Lets try and fix the regression in this PR and we can discuss other problems with teaEncode in a separate issue. |
Agreed. Let's get this fixed yesterday |
So basically, with the introduction of sbx's new parser, we started returning strings with
lua_pushlstring
, which takes a length as an argument, thus pushes the whole string along with padding. The old method usedlua_pushstring
which usedstrlen
, thus god rid of the padding.This PR fixes #1443 .
Edit: test resource: utf1443.zip