solemnwarning / rehex

Reverse Engineers' Hex Editor
https://rehex.solemnwarning.net/
GNU General Public License v2.0
2.3k stars 113 forks source link

Attempting to Printf file level char causes nil value error #159

Closed mdaniel closed 2 years ago

mdaniel commented 2 years ago

Given an input file of

00000000: 2550 4446 2d31 2e34 0a25 acdc 20ab ba0a  %PDF-1.4.%.. ...

and a binary template of:

char pdf_bytes[9];
Printf("found(%s)\n", pdf_bytes);

running it produces:

.../REHex.app/Contents/PlugIns/binary-template/executor.lua:624: attempt to call a nil value (method 'get')