warzone2100: fix FTBFS

This commit is contained in:
Alessio Sergi 2017-04-12 19:36:36 +02:00
parent 43fc99b77d
commit 6ebd6b0842

View file

@ -0,0 +1,23 @@
editbox.cpp:127:9: error: ambiguous overload for 'operator==' (operand types are 'QChar' and 'char')
if (ch == '\0')
--- lib/widget/editbox.cpp.orig
+++ lib/widget/editbox.cpp
@@ -124,7 +124,7 @@ void W_EDITBOX::initialise()
/* Insert a character into a text buffer */
void W_EDITBOX::insertChar(QChar ch)
{
- if (ch == '\0')
+ if (ch == QChar('\0'))
{
return;
}
@@ -150,7 +150,7 @@ void W_EDITBOX::insertChar(QChar ch)
/* Put a character into a text buffer overwriting any text under the cursor */
void W_EDITBOX::overwriteChar(QChar ch)
{
- if (ch == '\0')
+ if (ch == QChar('\0'))
{
return;
}