comparison lwasm/pseudo.c @ 162:02ada556bcc0

Fixed stupid error with for loop
author lost
date Sat, 31 Jan 2009 07:03:09 +0000
parents b061350c17e4
children 563adfccb645
comparison
equal deleted inserted replaced
161:56d60169fc4d 162:02ada556bcc0
1053 { 1053 {
1054 // look for symbol after op 1054 // look for symbol after op
1055 if (**p) 1055 if (**p)
1056 { 1056 {
1057 for (sym2 = *p; **p && !isspace(**p); (*p)++) 1057 for (sym2 = *p; **p && !isspace(**p); (*p)++)
1058 /* do nothing */ 1058 /* do nothing */ ;
1059 sym3 = lwasm_alloc(*p - sym2 + 1); 1059 sym3 = lwasm_alloc(*p - sym2 + 1);
1060 memcpy(sym3, sym2, *p - sym2); 1060 memcpy(sym3, sym2, *p - sym2);
1061 sym3[*p - sym2] = '\0'; 1061 sym3[*p - sym2] = '\0';
1062 1062
1063 l -> sym = sym3; 1063 l -> sym = sym3;
1064 } 1064 }
1065 } 1065 }
1066
1067 if (!(l -> sym)) 1066 if (!(l -> sym))
1068 { 1067 {
1069 register_error(as, l, 2, "No symbol"); 1068 register_error(as, l, 2, "No symbol");
1070 return; 1069 return;
1071 } 1070 }