]> granicus.if.org Git - icu/commitdiff
ICU-9310 inconsequential fix to uresbund.cpp
authorAndy Heninger <andy.heninger@gmail.com>
Thu, 10 May 2012 00:45:44 +0000 (00:45 +0000)
committerAndy Heninger <andy.heninger@gmail.com>
Thu, 10 May 2012 00:45:44 +0000 (00:45 +0000)
X-SVN-Rev: 31807

icu4c/source/common/uresbund.cpp

index 107426de4991a322a2c187ad73fba1ba14527de6..ea649eaa43f29e0fc9ae8f0b48319d5e2f0ad818 100644 (file)
@@ -1717,7 +1717,9 @@ ures_getByKeyWithFallback(const UResourceBundle *resB,
                 rootRes = dataEntry->fData.rootRes;
 
                 if(dataEntry->fBogus == U_ZERO_ERROR) {
-                    uprv_strncpy(path, resPath, len);
+                    if (len > 0) {
+                        uprv_memcpy(path, resPath, len);
+                    }
                     uprv_strcpy(path+len, inKey);
                     myPath = path;
                     key = inKey;