Openrct2: Fix writing to stdout

Created on 26 Apr 2020  路  3Comments  路  Source: OpenRCT2/OpenRCT2

There is an issue with out text is output to stdout when linenoise is reading from stdin. Each written line is not output from column 0 but rather where the last line ended.

openrct2 $ [LVSUPP06] Warning (5): Image table size longer than expected.
                                                                         [LVSUPP07] Warning (5): Image table size longer than expected.
                                                                                                                                       [LVSUPP08] Warning (5): Image table size longer than expected.
                                                                                                                                                                                                     [LVSUPP09] Warning (5): Image table size longer than expected.
                      [LVSUPP0A] Warning (5): Image table size longer than expected.
                                                                                    [LVSUPP0B] Warning (5): Image table size longer than expected.
                                                                                                                                                  [LVSUPP0C] Warning (5): Image table size longer than expected.
                                                                                                                                                                                                                [LVSUPP0D] Warning (5): Image table size longer than expected.
                                 [LVSUPP0E] Warning (5): Image table size longer than expected.
                                                                                               [MTTT1   ] Warning (5): Image table size longer than expected.
                                                                                                                                                             [XXSTAT03] Warning (5): Image table size longer than expected.
                                                                                                                                                                                                                           [XXSTAT08] Warning (5): Image table size longer than expected.
                                            [XXSTAT09] Warning (5): Image table size longer than expected.
                                                                                                          [XXSTAT04] Warning (5): Image table size longer than expected.
                                                                                                                                                                        [XXSTAT05] Warning (5): Image table size longer than expected.
                                                                                                                                                                                                                                      [MTTEPEE ] Warning (5): Image table size longer than expected.
                                                       [MTTOTEM ] Warning (5): Image table size longer than expected.
                                                                                                                     [CCTJT2  ] Warning (5): Image table size longer than expected.
                                                                                                                                                                                   [MTTJT3  ] Warning (5): Image table size longer than expected.
    [MTTJT4  ] Warning (5): Image table size longer than expected.
                                                                  [MTTL1   ] Warning (5): Image table size longer than expected.
                                                                                                                                [MTTM0   ] Warning (5): Image table size longer than expected.
                                                                                                                                                                                              [MTTM2   ] Warning (5): Image table size longer than expected.
               [MTMMENT1] Warning (5): Image table size longer than expected.
                                                                             [MTMMENT2] Warning (5): Image table size longer than expected.
                                                                                                                                           [MTMMENT3] Warning (5): Image table size longer than expected.
                                                                                                                                                                                                         [VOLCTTTY] Warning (5): Image table size longer than expected.
                          [CCTH2   ] Warning (5): Image table size longer than expected.
                                                                                        [LVSUPP01] Warning (5): Image table size longer than expected.
                                                                                                                                                      [LVSUPP02] Warning (5): Image table size longer than expected.
                                                                                                                                                                                                                    [LVSUPP05] Warning (5): Image table size longer than expected.
                                     [JSHIP   ] Warning (5): Image table size longer than expected.
                                                                                                   [SHOP1MKY] Warning (5): Image table size shorter than expected.
                                                                                                                                                                  ERROR[../src/openrct2/object/ObjectFactory.cpp:229 (CreateObjectFromLegacyFile)]: Error: Attempted to read past end of file. when processing object /home/janisozaur/games/rct2/ObjData/TBN.DAT
                                                                                                                    [rct2.tbn] Warning (3): Unable to open '/home/janisozaur/games/rct2/ObjData/TBN.DAT'
                                                                                                                                                                                                        WARNING[../src/openrct2/Game.cpp:469 (game_fix_save_vars)]: Peep 149 (Blanche D.) has invalid ride station = 255 for ride 21.
                                                                                        WARNING[../src/openrct2/Game.cpp:479 (game_fix_save_vars)]: Amending ride station to 0.
                                                                                                                                                                               [Your Plugin] Loaded
                                                                                                                                                                                                   [Your Plugin] Started
                                                                                                                                                                                                                        'Your plug-in has started!'
bug

All 3 comments

Just noticed this issue while messing around with scripting. For my own purposes, I just added r to the WriteLine function, which lets me log stuff in peace, but I found this linenoise issue thread where the author comments on how to fix this: https://github.com/antirez/linenoise/issues/67

This has been solved by #14088.

This is not yet fixed, only hidden. A proper fix is still necessary

Was this page helpful?
0 / 5 - 0 ratings