Skip to content

Commit

Permalink
Bug fix---NULL dereference
Browse files Browse the repository at this point in the history
  • Loading branch information
spc476 committed Feb 9, 2018
1 parent 4ce0db0 commit 815a557
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mc6809dis.c
Original file line number Diff line number Diff line change
Expand Up @@ -1811,7 +1811,7 @@ void mc6809dis_direct(
assert(dis != NULL);
assert(op != NULL);

addr.b[MSB] = cpu->dp;
addr.b[MSB] = cpu != NULL ? cpu->dp : 0;
addr.b[LSB] = (*dis->read)(dis,dis->next++);

snprintf(dis->operand,sizeof(dis->operand),"%02X",addr.b[LSB]);
Expand Down

0 comments on commit 815a557

Please sign in to comment.