summaryrefslogtreecommitdiff
path: root/src/util.c
diff options
context:
space:
mode:
authorportix <none@none>2012-06-13 12:35:47 +0200
committerportix <none@none>2012-06-13 12:35:47 +0200
commita0835c12ddf1a13f695da7782b100c32f196c44f (patch)
tree9e4a9d558b13780ee121d7f216371322d604b134 /src/util.c
parentd3c161a23aefc4631a7ccb4edb9871cdf961ada8 (diff)
downloaddwb-a0835c12ddf1a13f695da7782b100c32f196c44f.zip
Also strip history in dwb_sync_files
Diffstat (limited to 'src/util.c')
-rw-r--r--src/util.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/util.c b/src/util.c
index 5949cc6e..16ab1e2d 100644
--- a/src/util.c
+++ b/src/util.c
@@ -647,7 +647,7 @@ util_file_add(const char *filename, const char *text, int append, int max) {
gboolean ret = false;
if ( (file = fopen(filename, "r"))) {
- for (int i=0; fgets(buffer, sizeof buffer, file) && (max < 0 || i < max-1); i++ ) {
+ for (int i=0; fgets(buffer, sizeof buffer, file) && (max < 0 || i < max); i++) {
tmp = buffer;
while (g_ascii_isspace(*tmp) && *tmp != '\n')
tmp++;