mirror of
https://github.com/unicode-org/icu.git
synced 2025-04-14 17:24:01 +00:00
ICU-20767 Potential negative index access in one of the sample codes
This commit is contained in:
parent
ee2d1e7b9b
commit
a4a5c603ac
1 changed files with 1 additions and 1 deletions
|
@ -193,7 +193,7 @@ int main(int argc, char **argv)
|
|||
exit(-1);
|
||||
}
|
||||
|
||||
i = (int)time(NULL) % numFortunes; /* Use time to pick a somewhat-random fortune. */
|
||||
i = time(NULL) % numFortunes; /* Use time to pick a somewhat-random fortune. */
|
||||
resString = ures_getStringByIndex(fortunes_r, i, &len, &err);
|
||||
if (U_FAILURE(err)) {
|
||||
fprintf(stderr, "%s: ures_getStringByIndex(%d) failed, %s\n", programName, i, u_errorName(err));
|
||||
|
|
Loading…
Add table
Reference in a new issue