projects
/
SXSI
/
XMLTree.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
don't return .c_str() without copying it first
[SXSI/XMLTree.git]
/
XMLTree.h
diff --git
a/XMLTree.h
b/XMLTree.h
index
d446ab1
..
c6542a0
100644
(file)
--- a/
XMLTree.h
+++ b/
XMLTree.h
@@
-401,7
+401,8
@@
public:
}
\r
\r
uchar* GetCachedText(DocID d) {
\r
- return (uchar*) (CachedText.at(d).c_str());
\r
+ uchar * str = (uchar*) calloc(sizeof(char),(CachedText.at(d).size() + 1));
\r
+ return (uchar*) (str);
\r
}
\r
\r
TextCollection *getTextCollection() {
\r