diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/MessageComposer.cpp | 8 | ||||
-rw-r--r-- | src/Window.cpp | 2 |
2 files changed, 5 insertions, 5 deletions
diff --git a/src/MessageComposer.cpp b/src/MessageComposer.cpp index 56ff925..3ff0d76 100644 --- a/src/MessageComposer.cpp +++ b/src/MessageComposer.cpp @@ -33,7 +33,6 @@ namespace dchat EnclosedType parseEnclosedData(char endSymbol) { - ++index; bool foundEndOfType = false; while(index < length) @@ -47,7 +46,7 @@ namespace dchat } } - if(!foundEndOfType || index == length) + if(!foundEndOfType) return EnclosedType::TEXT; return EnclosedType::DATA; @@ -62,6 +61,7 @@ namespace dchat if(c == '[') { usize start = index; + ++index; if(parseEnclosedData(']') == EnclosedType::TEXT) { identifierRange.start = start; @@ -69,8 +69,7 @@ namespace dchat return Token::TEXT; } - c = getChar(); - if(c != '(') + if(index == length || getChar() != '(') { identifierRange.start = start; identifierRange.end = index; @@ -81,6 +80,7 @@ namespace dchat typeRange.end = index - 1; typeDataRange.start = index + 1; + ++index; switch(parseEnclosedData(')')) { case EnclosedType::TEXT: diff --git a/src/Window.cpp b/src/Window.cpp index 8a6652e..1344429 100644 --- a/src/Window.cpp +++ b/src/Window.cpp @@ -272,7 +272,7 @@ namespace dchat } prevTimeMillis = std::chrono::duration_cast<std::chrono::milliseconds>(std::chrono::system_clock::now().time_since_epoch()).count() - 5000; //drawBackgroundConnection = signal_draw().connect(sigc::mem_fun(*this, &Window::drawBackground)); - //set_size_request(640, 480); + set_size_request(640, 480); //set_app_paintable(true); } |