mirror of https://github.com/GNOME/gimp.git
fix length calculation (in fact, no calculation is needed at all).
2008-08-30 Michael Natterer <mitch@gimp.org> * tools/test-clipboard.c (test_clipboard_paste): fix length calculation (in fact, no calculation is needed at all). svn path=/trunk/; revision=26822
This commit is contained in:
parent
a59b7683aa
commit
b12a891952
|
@ -1,3 +1,8 @@
|
|||
2008-08-30 Michael Natterer <mitch@gimp.org>
|
||||
|
||||
* tools/test-clipboard.c (test_clipboard_paste): fix length
|
||||
calculation (in fact, no calculation is needed at all).
|
||||
|
||||
2008-08-29 Sven Neumann <sven@gimp.org>
|
||||
|
||||
* authors.xml: fixed role of Aurore Derriennic.
|
||||
|
|
|
@ -366,8 +366,7 @@ test_clipboard_paste (GtkClipboard *clipboard,
|
|||
FALSE));
|
||||
if (data)
|
||||
{
|
||||
gsize bytes;
|
||||
gint fd;
|
||||
gint fd;
|
||||
|
||||
fd = open (filename, O_WRONLY | O_CREAT | O_TRUNC, 0644);
|
||||
|
||||
|
@ -378,9 +377,7 @@ test_clipboard_paste (GtkClipboard *clipboard,
|
|||
return FALSE;
|
||||
}
|
||||
|
||||
bytes = data->length * data->format / 8;
|
||||
|
||||
if (write (fd, data->data, bytes) < bytes)
|
||||
if (write (fd, data->data, data->length) < data->length)
|
||||
{
|
||||
close (fd);
|
||||
g_printerr ("%s: write() failed: %s",
|
||||
|
|
Loading…
Reference in New Issue