Make save actions use something bigger than a pointer for a buffer
At commit 160e5e stamp was changed from a gchar[512] to a gchar* but the copy loop still used stamp and sizeof(stamp) as the buffer. Now gchar[512] buffer is used again.
This commit is contained in:
parent
5c37ca87f0
commit
1e1032505d
@ -191,6 +191,7 @@ static void backupcopy_document_save_cb(GObject *obj, GeanyDocument *doc, gpoint
|
||||
gchar *basename_src;
|
||||
gchar *dir_parts_src;
|
||||
gchar *stamp;
|
||||
gchar buf[512];
|
||||
|
||||
if (! enable_backupcopy)
|
||||
return;
|
||||
@ -227,9 +228,9 @@ static void backupcopy_document_save_cb(GObject *obj, GeanyDocument *doc, gpoint
|
||||
return;
|
||||
}
|
||||
|
||||
while (fgets(stamp, sizeof(stamp), src) != NULL)
|
||||
while (fgets(buf, sizeof(buf), src) != NULL)
|
||||
{
|
||||
fputs(stamp, dst);
|
||||
fputs(buf, dst);
|
||||
}
|
||||
|
||||
fclose(src);
|
||||
|
Loading…
x
Reference in New Issue
Block a user