diff options
author | fonsinchen <fonsinchen@openttd.org> | 2013-08-10 12:47:11 +0000 |
---|---|---|
committer | fonsinchen <fonsinchen@openttd.org> | 2013-08-10 12:47:11 +0000 |
commit | 438520c3f4c9f5bff0b0ff9b087dbbb92752c8b3 (patch) | |
tree | a4b595c22861e6dc83087c086c92bb87d6f9555e /src/textbuf.cpp | |
parent | 6777059c15feba7deb59957116a63718a22a928d (diff) | |
download | openttd-438520c3f4c9f5bff0b0ff9b087dbbb92752c8b3.tar.xz |
(svn r25708) -Fix: don't return NULL as bool
Diffstat (limited to 'src/textbuf.cpp')
-rw-r--r-- | src/textbuf.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/textbuf.cpp b/src/textbuf.cpp index 445ebe59d..766396fc6 100644 --- a/src/textbuf.cpp +++ b/src/textbuf.cpp @@ -162,7 +162,7 @@ bool Textbuf::InsertString(const char *str, bool marked, const char *caret, cons uint16 insertpos = (marked && this->marklength != 0) ? this->markpos : this->caretpos; if (insert_location != NULL) { insertpos = insert_location - this->buf; - if (insertpos > this->bytes) return NULL; + if (insertpos > this->bytes) return false; if (replacement_end != NULL) { this->DeleteText(insertpos, replacement_end - this->buf, str == NULL); |