1
0
mirror of https://github.com/rkujawa/rk65c02.git synced 2024-12-13 01:29:57 +00:00

Add some null pointer checking asserts.

This commit is contained in:
Radosław Kujawa 2017-02-02 14:43:44 +01:00
parent 6711a8fe11
commit 941036615e

View File

@ -64,6 +64,8 @@ rk65c02_exec(rk65c02emu_t *e)
void
rk65c02_start(rk65c02emu_t *e) {
assert(e != NULL);
e->state = RUNNING;
while (e->state == RUNNING) {
rk65c02_exec(e);
@ -78,6 +80,8 @@ rk65c02_step(rk65c02emu_t *e, uint16_t steps) {
uint16_t i = 0;
assert(e != NULL);
e->state = STEPPING;
while ((e->state == STEPPING) && (i < steps)) {
rk65c02_exec(e);