project_files/hwc/rtl/misc.c
changeset 14255 a7320c65f484
parent 11657 09ebdfe364d9
child 14256 fa2e3f123a09
equal deleted inserted replaced
14254:06f2dc4deab2 14255:a7320c65f484
   160 
   160 
   161 
   161 
   162 astring fpcrtl_pchar2astr(const char *s)
   162 astring fpcrtl_pchar2astr(const char *s)
   163 {
   163 {
   164     astring result;
   164     astring result;
       
   165 
       
   166     if(!s) {
       
   167         result.len = 0;
       
   168         return result;
       
   169     }
       
   170 
   165     int rlen = strlen(s);
   171     int rlen = strlen(s);
   166 
   172 
   167     if(rlen > MAX_ANSISTRING_LENGTH){
   173     if(rlen > MAX_ANSISTRING_LENGTH){
   168         rlen = MAX_ANSISTRING_LENGTH;
   174         rlen = MAX_ANSISTRING_LENGTH;
   169     }
   175     }