aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/MessageBoard.hpp2
-rw-r--r--include/StringView.hpp2
2 files changed, 3 insertions, 1 deletions
diff --git a/include/MessageBoard.hpp b/include/MessageBoard.hpp
index 9025e48..a947c1b 100644
--- a/include/MessageBoard.hpp
+++ b/include/MessageBoard.hpp
@@ -25,6 +25,8 @@ namespace dchat
void processEvent(const sf::Event &event);
void draw(sf::RenderWindow &window, Cache &cache);
private:
+ usize findPositionToInsertMessageByTimestamp(Message *message);
+
void updateStaticContentTexture(const sf::Vector2u &newSize);
void addMessage(Message *message, const odhtdb::Hash &id);
void deleteMessage(const odhtdb::Hash &id, const odhtdb::Signature::PublicKey &requestedByUser);
diff --git a/include/StringView.hpp b/include/StringView.hpp
index c4e7ce3..d320a85 100644
--- a/include/StringView.hpp
+++ b/include/StringView.hpp
@@ -80,7 +80,7 @@ namespace dchat
for(usize i = offset; i < size - (substr.size - 1); ++i)
{
- if(memcmp(data + i, substr.data, substr.size) == 0)
+ if(memcmp(data + i, substr.data, substr.size * sizeof(CharType)) == 0)
return i;
}
return -1;