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

查看:177
本文介绍了是否可以更改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天全站免登陆