Fixed new unescape_string(): didn't null terminate string.

svn path=/trunk/boinc/; revision=9176
This commit is contained in:
Bruce Allen 2006-01-05 09:30:41 +00:00
parent 3527c41581
commit 2be5446559
2 changed files with 9 additions and 1 deletions

View File

@ -73,3 +73,10 @@ David 4 Jan 2006
db/
db_base.C
Bruce 5 Jan 2006
- Fixed new unescape_string(): didn't null terminate string.
db/
db_base.C

View File

@ -366,10 +366,11 @@ void unescape_string(char* p, int /*len*/) {
while (*p) {
if (*p == '\\') {
p++;
if (!*p) break; // SHOULD NEVER HAPPEN!
}
if (!*p) break;
*q++ = *p++;
}
*q='\0';
}
// replace _ with \\_, % with \\%