是否可以更改 Lua 字节码中的字符串(内容和大小)以使其仍然正确? [英] Is it possible to change strings (content and size) in Lua bytecode so that it will still be correct?

查看:23
本文介绍了是否可以更改 Lua 字节码中的字符串(内容和大小)以使其仍然正确?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以更改 Lua 字节码中的字符串(内容和大小)以使其仍然正确?它是关于在 Lua 字节码中翻译字符串.当然,并非每种语言的每个单词的大小都相同...

Is it possible to change strings (content and size) in Lua bytecode so that it will still be correct? It's about translating strings in Lua bytecode. Of course, not every language has the same size for each word...

推荐答案

是的,前提是您知道自己在做什么.字符串以其存储为 int 的大小作为前缀.该 int 的大小和字节序取决于平台.但是为什么要编辑字节码呢?你失去了来源吗?

Yes, it is if you know what you're doing. Strings are prefixed by their size stored as an int. The size and endianness of that int is platform-dependent. But why do you have to edit bytecode? Have you lost the sources?

这篇关于是否可以更改 Lua 字节码中的字符串(内容和大小)以使其仍然正确?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆