mirror of
https://github.com/unicode-org/icu.git
synced 2025-04-13 08:53:20 +00:00
ICU-1109 avoid confusing users with pre-existing non-terminated-warnings
X-SVN-Rev: 6025
This commit is contained in:
parent
9ebb3c1ae6
commit
541fc426f0
1 changed files with 4 additions and 0 deletions
|
@ -1299,6 +1299,10 @@ u_growBufferFromStatic(void *context,
|
|||
if(length<destCapacity) { \
|
||||
/* NUL-terminate the string, the NUL fits */ \
|
||||
dest[length]=0; \
|
||||
/* unset the not-terminated warning but leave all others */ \
|
||||
if(*pErrorCode==U_STRING_NOT_TERMINATED_WARNING) { \
|
||||
*pErrorCode=U_ZERO_ERROR; \
|
||||
} \
|
||||
} else if(length==destCapacity) { \
|
||||
/* unable to NUL-terminate, but the string itself fit - set a warning code */ \
|
||||
*pErrorCode=U_STRING_NOT_TERMINATED_WARNING; \
|
||||
|
|
Loading…
Add table
Reference in a new issue