diff --git a/src/ncmpcpp.cpp b/src/ncmpcpp.cpp index 159596ae..5e8265fd 100644 --- a/src/ncmpcpp.cpp +++ b/src/ncmpcpp.cpp @@ -2721,7 +2721,7 @@ int main(int argc, char *argv[]) || (wCurrent == mEditorTags && !mEditorTags->Empty())) { size_t id = ((Menu *)wCurrent)->Choice(); - Song *s; + Song *s = 0; switch (current_screen) { case csPlaylist: @@ -3309,7 +3309,7 @@ int main(int argc, char *argv[]) || (wCurrent == mPlaylistEditor && !mPlaylistEditor->Empty()) || (wCurrent == mEditorTags && !mEditorTags->Empty())) { - Song *s; + Song *s = 0; size_t id = ((Menu *)wCurrent)->Choice(); switch (current_screen) { @@ -3460,7 +3460,7 @@ int main(int argc, char *argv[]) { LOAD_LYRICS: - Song *s; + Song *s = 0; int id; if (reload_lyrics) diff --git a/src/window.cpp b/src/window.cpp index 365f9d68..47498eef 100644 --- a/src/window.cpp +++ b/src/window.cpp @@ -378,6 +378,8 @@ string Window::GetString(const string &base, size_t length, size_t width) const if (wcwidth(*it) > 1) block_scrolling = 1; + beginning = -1; + do { if (tmp.empty())