Skip to content
This repository has been archived by the owner on Dec 28, 2021. It is now read-only.

Commit

Permalink
licq: Don't break on empty line in history file
Browse files Browse the repository at this point in the history
  • Loading branch information
flynd committed Jan 14, 2013
1 parent 99b6f98 commit dd9c41c
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions licq/src/contactlist/userhistory.cpp
@@ -1,6 +1,6 @@
/*
* This file is part of Licq, an instant messaging client for UNIX.
* Copyright (C) 1998-2012 Licq developers <licq-dev@googlegroups.com>
* Copyright (C) 1998-2013 Licq developers <licq-dev@googlegroups.com>
*
* Licq is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
Expand Down Expand Up @@ -76,7 +76,8 @@ void UserHistory::setFile(const string& filename, const string& description)
while ((szResult = fgets(sz, sizeof(sz), f)) != NULL && sz[0] == ':') \
dest.append(sz+1); \
/* Don't include the final line break */ \
dest.resize(dest.size() - 1); \
if (dest.size() > 0) \
dest.resize(dest.size() - 1); \
}

#define SKIP_VALID_LINES \
Expand Down

0 comments on commit dd9c41c

Please sign in to comment.