diff options
-rw-r--r-- | bfcomp.c | 3 |
1 files changed, 1 insertions, 2 deletions
@@ -238,14 +238,13 @@ void writeprogram(char *source,FILE *asmf,Sourcemap *sm){ do { char c=source[i]; if(addc&&c!='+'&&c!='-'){ - addc=(addc%256)+256%256; + addc=((addc%256)+256)%256; if(addc==1)fprintf(asmf,"\tinc byte [rbx] ; 1 +\n"); else if(addc==-1)fprintf(asmf,"\tdec byte [rbx] ; 1 -\n"); else fprintf(asmf,"\tadd byte [rbx], %d ; %d %c\n",addc,addc<0?-addc:addc,addc<0?'-':'+'); addc=0; } if(shiftc&&c!='>'&&c!='<'){ - shiftc=(shiftc%256)+256%256; if(params.lastcell){ if(lastshiftc>0&&shiftc<0){ int id=uniqid(); |