dict.c
changeset 10 188a0e3b3fb4
parent 8 09ec33061ff3
child 14 a961bb8806b9
equal deleted inserted replaced
9:225d6c820d23 10:188a0e3b3fb4
   149 char * get_def(FILE *fdefs, int offset, int length)
   149 char * get_def(FILE *fdefs, int offset, int length)
   150 {
   150 {
   151     char *out;
   151     char *out;
   152     fseek(fdefs, offset, SEEK_SET);
   152     fseek(fdefs, offset, SEEK_SET);
   153 
   153 
   154     out = (char *) malloc(length);
   154     out = (char *) malloc(length+1);
   155     fread(out, length, 1, fdefs);
   155     fread(out, length, 1, fdefs);
       
   156     out[length] = 0;
   156     return out;
   157     return out;
   157 }
   158 }
   158 
   159 
   159 static char num_to_ia5char(int n)
   160 static char num_to_ia5char(int n)
   160 {
   161 {