egordorichev / neko8

Fantasy console inspired by pico8, tic80 and liko12, written in c++
https://egordorichev.itch.io/neko8
112 stars 11 forks source link

Crash when run a demo, then press ESC back to terminal, then run cls #9

Closed FreeBlues closed 7 years ago

FreeBlues commented 7 years ago

On Mac, do like below:

  1. Run a demo;
  2. Press ESC back to terminal;
  3. Run command cls; It will crash
Error: main.lua:1258: attempt to perform arithmetic on local 'c' (a table value)
stack traceback:
    main.lua:1258: in function 'color'
    main.lua:1845: in function 'v'
    [string "/neko.n8"]:195: in function 'run_command'
    [string "/neko.n8"]:166: in function 'triggerCallback'
    main.lua:194: in function <main.lua:105>
    main.lua:310: in function <main.lua:282>
    [C]: in function 'xpcall'
Air:neko8 admin$
pi-pi3 commented 7 years ago

Confirmed. This happens every time the cls command is called on current master

pi-pi3 commented 7 years ago

Fixed. The command system will later be rewritten, so things like this won't occur later