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:
parent
6711a8fe11
commit
941036615e
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user