ICU-5161 Fix Purify/valgrind warnings about uninitialized memory reading.
X-SVN-Rev: 19551
This commit is contained in:
parent
8530362290
commit
ac0ec58b80
@ -1,7 +1,7 @@
|
||||
/*
|
||||
*******************************************************************************
|
||||
*
|
||||
* Copyright (C) 1997-2004, International Business Machines
|
||||
* Copyright (C) 1997-2006, International Business Machines
|
||||
* Corporation and others. All Rights Reserved.
|
||||
*
|
||||
*******************************************************************************
|
||||
@ -47,6 +47,8 @@ ResourceBundle::constructForLocale(const UnicodeString& path,
|
||||
}
|
||||
else {
|
||||
UnicodeString nullTerminatedPath(path);
|
||||
nullTerminatedPath.append((UChar)0);
|
||||
nullTerminatedPath.truncate(nullTerminatedPath.length()-1);
|
||||
fResource = ures_openU(nullTerminatedPath.getTerminatedBuffer(), locale.getName(), &error);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user