• Concatenated CTRL-A code causes previous char to be lost

    From Josh Renaud@1:103/705 to GitLab issue in main/sbbs on Tue Nov 11 20:33:56 2025
    open https://gitlab.synchro.net/main/sbbs/-/issues/1008

    In putting together my test case script for issue #1007 I came across another problem.

    If you concatenate CTRL-A color codes in the middle of a string, the previous character will be consumed and not output. For example:

    ```
    var lowRed = '\1N\1R\10';
    var lowBlue = '\1N\1B\10';
    console.putmsg(lowBlue+'TEST1 TEST1'+lowRed+' TEST1')
    ```

    will result in the characters `TEST1 TEST TEST1` being output -- notice the second numeral `1` has been lost.

    This apparently happens in both console.putmsg() and Frame.js .putmsg().
    --- SBBSecho 3.31-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Rob Swindell@1:103/705 to GitLab note in main/sbbs on Wed Nov 12 00:31:04 2025
    https://gitlab.synchro.net/main/sbbs/-/issues/1008#note_7869

    "\10" is octal 10, which is decimal 8, which is the ASCII backspace character (Ctrl-H, the CTRL char corresponding to the 8th letter of the alphabet); so that's expected behavior.

    If you add "use strict" to the top of your JS source file, you should get a warning or errors about using octal constants.

    Use "\x01" instead of "\1" to avoid this issue.
    --- SBBSecho 3.31-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Josh Renaud@1:103/705 to GitLab issue in main/sbbs on Wed Nov 12 05:59:56 2025
    close https://gitlab.synchro.net/main/sbbs/-/issues/1008
    --- SBBSecho 3.31-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Josh Renaud@1:103/705 to GitLab note in main/sbbs on Wed Nov 12 05:59:56 2025
    https://gitlab.synchro.net/main/sbbs/-/issues/1008#note_7870

    Of course, I should have thought of that.

    I switched to `\1` format just to make my test case for issue #1007 readable on the web. Clearly that change resulted in this issue.

    What I had actually used in my animation .js file was the CTRL-A character itself, `0x01`.

    The Sublime Text editor renders it like this:

    ```var lowRed = '<0x01>N<0x01>R<0x01>0';```

    I double-checked just now, and my original code works fine. Your octal explanation is the answer.

    Sorry to waste your time!
    --- SBBSecho 3.31-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)

Novedades:

Servidor de Quake 3 Arena Online! - Conectate a ferchobbs.ddns.net, puerto 27960 y vence con tu equipo!