40 m_file = file; |
40 m_file = file; |
41 m_status = NullDecoder::no_error; |
41 m_status = NullDecoder::no_error; |
42 |
42 |
43 // try to load the string table |
43 // try to load the string table |
44 long cur_offset = ftell(file); |
44 long cur_offset = ftell(file); |
45 m_table = (char*)os::malloc(sizeof(char) * shdr.sh_size); |
45 m_table = (char*)os::malloc(sizeof(char) * shdr.sh_size, mtInternal); |
46 if (m_table != NULL) { |
46 if (m_table != NULL) { |
47 // if there is an error, mark the error |
47 // if there is an error, mark the error |
48 if (fseek(file, shdr.sh_offset, SEEK_SET) || |
48 if (fseek(file, shdr.sh_offset, SEEK_SET) || |
49 fread((void*)m_table, shdr.sh_size, 1, file) != 1 || |
49 fread((void*)m_table, shdr.sh_size, 1, file) != 1 || |
50 fseek(file, cur_offset, SEEK_SET)) { |
50 fseek(file, cur_offset, SEEK_SET)) { |