Results 1 to 2 of 2

Thread: thinAir: File saving bug adding redundant characters, confuses git

  1. #1
    Super Moderator Petr Schreiber's Avatar
    Join Date
    Aug 2005
    Location
    Brno - Czech Republic
    Posts
    7,155
    Rep Power
    736

    Exclamation thinAir: File saving bug adding redundant characters, confuses git

    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
    Attached Images Attached Images
    Last edited by Petr Schreiber; 25-10-2019 at 21:58.
    Learn 3D graphics with ThinBASIC, learn TBGL!
    Windows 10 64bit - Intel Core i5-3350P @ 3.1GHz - 16 GB RAM - NVIDIA GeForce GTX 1050 Ti 4GB

  2. #2
    Member DirectuX's Avatar
    Join Date
    Oct 2018
    Location
    France
    Posts
    417
    Rep Power
    55

    Lightbulb

    Hi,

    I put a script on Github to cope this inconvenience.
    ThinBasic 1.11.6.0 ALPHA - Windows 8.1 x64

Similar Threads

  1. ThinAIR and assembler source file
    By RobertoBianchi in forum thinAir Tips and Tricks
    Replies: 0
    Last Post: 11-10-2006, 15:33

Members who have read this thread: 0

There are no members to list at the moment.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •