PDA

View Full Version : thinAir: File saving bug adding redundant characters, confuses git



Petr Schreiber
25-10-2019, 21:56
Hi Eros,

I think there is a tiny bug in thinAIR, which "corrupts" the files for use with git.

In fact, it does one redundant thing, which does not add value to script AND it confuses git.

What is happening?
thinBasic source files are saved in UTF8 encoding, with BOM at the beginning. That is perfectly fine and standard.

However, each time you save file, it terminates it with two $NUL characters - this is both not needed for UTF8 file, and it also makes git think the files is binary.

How to replicate
Please, once you have time, open ThinAIR, create new file, save the script.

Then open the script in HEX editor, for example PSPad in hex mode.

The last two chars will be 00 00.

How to fix
I would like thinAir to not save the two zero characters at the end.


Petr

DirectuX
18-12-2019, 18:32
Hi,

I put a script on Github (https://github.com/DirectuX/GitPrepare) to cope this inconvenience.