Fix signedness bug. All stage-0 compiler tests pass.
Chris Pressey
11 years ago
20 | 20 | char *text; |
21 | 21 | |
22 | 22 | if (size == 1) { |
23 | int i; | |
23 | 24 | if (term_single_byte_table == NULL) { |
24 | int i; | |
25 | 25 | term_single_byte_table = malloc(sizeof(struct term) * 256); |
26 | 26 | for (i = 0; i < 256; i++) { |
27 | 27 | term_single_byte_data[i] = (char)i; |
31 | 31 | term_single_byte_table[i].subterms = NULL; |
32 | 32 | } |
33 | 33 | } |
34 | return &term_single_byte_table[(int)atom[0]]; | |
34 | i = ((unsigned char *)atom)[0]; | |
35 | return &term_single_byte_table[i]; | |
35 | 36 | } |
36 | 37 | |
37 | 38 | t = malloc(sizeof(struct term)); |