Old 07-20-2013, 01:52 PM   #1
Human being with feelings
Join Date: Jul 2013
Posts: 1
Default Minor bug causes INI-file to grow

On Windows, every time LICEcap 1.23 is closed, the settings in the "%APPDATA%\licecap.ini" file are updated in such a way that yet another linefeed character is introduced at the end of the "wnd_r=…" row. This is not visible in Notepad (as it doesn't recognize linefeeds alone), but can be seen in other text editors (like Notepad++). Note that although the INI-file uses CR/LF-pairs as a new line indicator, the appended character is just a single LF (one more every time).
Phthiraptera is offline   Reply With Quote
Old 08-04-2013, 01:17 AM   #2
Human being with feelings
witti's Avatar
Join Date: May 2012
Posts: 1,186

Confirmed !

(My notepad shows the linefeed character.)
witti is offline   Reply With Quote
Old 09-11-2013, 03:21 AM   #3
Human being with feelings
Tale's Avatar
Join Date: Jul 2008
Location: The Netherlands
Posts: 3,007

There is a "\n" in a sprintf() format string that shouldn't be there, i.e.:

diff --git a/licecap_ui.cpp b/licecap_ui.cpp
index 35dae18..ed71b64 100644
--- a/licecap_ui.cpp
+++ b/licecap_ui.cpp
@@ -759,7 +759,7 @@ static WDL_DLGRET liceCapMainProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM
         char buf[1024];
         RECT r;
-        sprintf(buf,"%d %d %d %d\n",r.left,r.top,r.right,r.bottom);
+        sprintf(buf,"%d %d %d %d",r.left,r.top,r.right,r.bottom);
         sprintf(buf, "%d", g_max_fps);
Tale is offline   Reply With Quote
Old 09-12-2013, 10:09 AM   #4
Justin's Avatar
Join Date: Jan 2005
Location: NYC
Posts: 12,589

oops. heh.
Justin is online now   Reply With Quote

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

All times are GMT -7. The time now is 11:06 PM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2019, vBulletin Solutions Inc.