Skip to content
This repository has been archived by the owner on Feb 20, 2018. It is now read-only.

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

Closed
FreeBlues opened this issue Sep 11, 2017 · 2 comments
Closed
Assignees

Comments

@FreeBlues
Copy link
Contributor

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
Copy link
Collaborator

pi-pi3 commented Sep 11, 2017

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

@pi-pi3 pi-pi3 self-assigned this Sep 11, 2017
pi-pi3 added a commit that referenced this issue Sep 11, 2017
Calling `cls` would result in an exception. The `run_command` function
passes a table of arguments to the command, but the `api.cls` function
expects a number. The `cls` command is now wrapped in a closure like
this: `function(a) cls(a and unpck(a)) end`.
@pi-pi3
Copy link
Collaborator

pi-pi3 commented Sep 11, 2017

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

@pi-pi3 pi-pi3 closed this as completed Sep 11, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants