1
0
mirror of https://github.com/cc65/cc65.git synced 2024-12-27 00:29:31 +00:00

Small code changes for more safety (and to be compatible with the new shift

routines that don't use the stack).


git-svn-id: svn://svn.cc65.org/cc65/trunk@5762 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
uz 2012-07-06 19:59:29 +00:00
parent c6db670be5
commit da766d872c

View File

@ -36,6 +36,7 @@
#include <string.h> #include <string.h>
/* common */ /* common */
#include "chartype.h"
#include "strbuf.h" #include "strbuf.h"
#include "xmalloc.h" #include "xmalloc.h"
#include "xsprintf.h" #include "xsprintf.h"
@ -65,8 +66,11 @@ static unsigned OptPtrStore1Sub (CodeSeg* S, unsigned I, CodeEntry** const L)
if (L[0]->OPC == OP65_AND || if (L[0]->OPC == OP65_AND ||
L[0]->OPC == OP65_EOR || L[0]->OPC == OP65_EOR ||
L[0]->OPC == OP65_ORA || L[0]->OPC == OP65_ORA ||
(L[0]->OPC == OP65_JSR && strncmp (L[0]->Arg, "shlax", 5) == 0) || (L[0]->OPC == OP65_JSR &&
(L[0]->OPC == OP65_JSR && strncmp (L[0]->Arg, "shrax", 5) == 0)) { (strncmp (L[0]->Arg, "shlax", 5) == 0 ||
strncmp (L[0]->Arg, "shrax", 5) == 0) &&
strlen (L[0]->Arg) == 6 &&
IsDigit (L[0]->Arg[5]))) {
/* One insn */ /* One insn */
return 1; return 1;