mirror of
https://github.com/simon987/Much-Assembly-Required.git
synced 2025-04-20 11:06:46 +00:00
Fixes #115
This commit is contained in:
parent
0bd25df977
commit
a8beb8c3e2
@ -21,6 +21,7 @@ public class CodeUploadHandler implements MessageHandler {
|
|||||||
//TODO Should we wait at the end of the tick to modify the CPU ?
|
//TODO Should we wait at the end of the tick to modify the CPU ?
|
||||||
user.getUser().setUserCode((String) json.get("code"));
|
user.getUser().setUserCode((String) json.get("code"));
|
||||||
|
|
||||||
|
if (user.getUser().getUserCode() != null) {
|
||||||
AssemblyResult ar = new Assembler(user.getUser().getCpu().getInstructionSet(),
|
AssemblyResult ar = new Assembler(user.getUser().getCpu().getInstructionSet(),
|
||||||
user.getUser().getCpu().getRegisterSet(),
|
user.getUser().getCpu().getRegisterSet(),
|
||||||
GameServer.INSTANCE.getConfig()).parse(user.getUser().getUserCode());
|
GameServer.INSTANCE.getConfig()).parse(user.getUser().getUserCode());
|
||||||
@ -46,6 +47,7 @@ public class CodeUploadHandler implements MessageHandler {
|
|||||||
|
|
||||||
user.getWebSocket().send(response.toJSONString());
|
user.getWebSocket().send(response.toJSONString());
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user