aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2018-05-03 14:32:28 +0200
committerdec05eba <dec05eba@protonmail.com>2018-05-03 14:32:31 +0200
commit00b1719b1a4cd3d863dc0f247af0b95d4ea0c0f8 (patch)
treeadb033368047b4f156f5b52cddac3a28e7b3af97 /src
parentb6e09fe34e81e45562f574b813cccc78fd21fafe (diff)
Replace all binds in chat
Diffstat (limited to 'src')
-rw-r--r--src/Chatbar.cpp2
-rw-r--r--src/Gif.cpp4
2 files changed, 3 insertions, 3 deletions
diff --git a/src/Chatbar.cpp b/src/Chatbar.cpp
index dd5a925..55fd764 100644
--- a/src/Chatbar.cpp
+++ b/src/Chatbar.cpp
@@ -228,7 +228,7 @@ namespace dchat
if(findOffset != string::npos)
{
string substr = str.replace(findOffset, substrToReplace.size(), stringToReplaceWith);
- findOffset += substrToReplace.size() + stringToReplaceWith.size();
+ findOffset += stringToReplaceWith.size();
}
}
}
diff --git a/src/Gif.cpp b/src/Gif.cpp
index f87b0ab..a9e7850 100644
--- a/src/Gif.cpp
+++ b/src/Gif.cpp
@@ -137,8 +137,8 @@ namespace dchat
double timeElapsedMilli = (double)frameTimer.getElapsedTime().asMilliseconds();
// If gif is not redrawn for a while, then we want to reset it; otherwise the decoding loop will take too long time.
// This means that if gif is not visible for a while and then it becomes visible, the gif will reset instead of trying to process several seconds of frames
- if(timeElapsedMilli > 3000)
- timeElapsedMilli = 0;
+ if(timeElapsedMilli > 3000.0)
+ timeElapsedMilli = 0.0;
double frameDeltaCs = timeElapsedMilli * 0.1; // Centisecond
frameTimer.restart();
timeElapsedCs += frameDeltaCs;