fixed Bit_To_Symbol and Bits_To_Symbols.
This commit is contained in:
parent
a6a8d85ac1
commit
aa52bf5b67
|
@ -27,7 +27,7 @@ s48_value s48_enter_symbol(char* name) {
|
||||||
s48_value Bits_To_Symbols(unsigned long bits, SYMDESCR* table) {
|
s48_value Bits_To_Symbols(unsigned long bits, SYMDESCR* table) {
|
||||||
s48_value res = S48_NULL;
|
s48_value res = S48_NULL;
|
||||||
char* name;
|
char* name;
|
||||||
int val;
|
unsigned long val;
|
||||||
int i = 0;
|
int i = 0;
|
||||||
|
|
||||||
S48_DECLARE_GC_PROTECT(1);
|
S48_DECLARE_GC_PROTECT(1);
|
||||||
|
@ -62,7 +62,7 @@ unsigned long Symbol_To_Bit(s48_value Sym, SYMDESCR* table) {
|
||||||
unsigned long res = 0;
|
unsigned long res = 0;
|
||||||
char* sym = s48_extract_symbol(Sym);
|
char* sym = s48_extract_symbol(Sym);
|
||||||
int i;
|
int i;
|
||||||
for (i=0; table[i].val != 0 ;i++) {
|
for (i=0; table[i].name != (char*)0; i++) {
|
||||||
if (strcmp(sym, table[i].name) == 0) {
|
if (strcmp(sym, table[i].name) == 0) {
|
||||||
return table[i].val;
|
return table[i].val;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue