changeset 14271 | a7320c65f484 |
parent 11652 | 09ebdfe364d9 |
child 14272 | fa2e3f123a09 |
14270:06f2dc4deab2 | 14271: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 } |