1 diff -ur icu.org/source/tools/genrb/rbutil.c icu/source/tools/genrb/rbutil.c
2 --- icu.org/source/tools/genrb/rbutil.c 2020-10-28 22:21:12.000000000 +0100
3 +++ icu/source/tools/genrb/rbutil.c 2020-11-16 19:50:44.005119253 +0100
5 get_dirname(char *dirname,
8 - const char *lastSlash = uprv_strrchr(filename, U_FILE_SEP_CHAR) + 1;
9 + const char *lastSlash = uprv_strrchr(filename, U_FILE_SEP_CHAR);
10 + if(lastSlash == NULL) {
11 + lastSlash = filename;
16 if(lastSlash>filename) {
17 uprv_strncpy(dirname, filename, (lastSlash - filename));
21 /* strip off any leading directory portions */
22 - const char *lastSlash = uprv_strrchr(filename, U_FILE_SEP_CHAR) + 1;
23 + const char *lastSlash = uprv_strrchr(filename, U_FILE_SEP_CHAR);
24 + if(lastSlash == NULL) {
25 + lastSlash = filename;
31 if(lastSlash>filename) {