forked from pikhq/sabotage
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
leafpad: fix bug causing junk written on saving
the string str was converted into UTF8 and stored into a new string cstr, and then freed. however when saving str was used again instead of cstr. fixes #129
- Loading branch information
Showing
2 changed files
with
16 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
--- leafpad-0.8.18.org/src/file.c 2013-10-19 23:33:43.767308069 +0000 | ||
+++ leafpad-0.8.18/src/file.c 2013-10-19 23:34:34.263306257 +0000 | ||
@@ -223,7 +223,7 @@ | ||
GTK_MESSAGE_ERROR, _("Can't open file to write")); | ||
return -1; | ||
} | ||
- if (fwrite(str, 1, wbytes, fp) != wbytes) { | ||
+ if (fwrite(cstr, 1, wbytes, fp) != wbytes) { | ||
run_dialog_message(gtk_widget_get_toplevel(view), | ||
GTK_MESSAGE_ERROR, _("Can't write file")); | ||
return -1; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters