chiark
/
gitweb
/
~mdw
/
clg
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
7f1ebcc
)
Bug fix in stdio_write_func
author
espen
<espen>
Mon, 9 Feb 2009 11:46:21 +0000
(11:46 +0000)
committer
espen
<espen>
Mon, 9 Feb 2009 11:46:21 +0000
(11:46 +0000)
cairo/alien/cairo-jpeg.c
patch
|
blob
|
blame
|
history
diff --git
a/cairo/alien/cairo-jpeg.c
b/cairo/alien/cairo-jpeg.c
index 988258808c5e02d85e5ef59a2e365dc23b278d86..c59e299fc3d326c2fe7826c5d1fdd8b6ef8341de 100644
(file)
--- a/
cairo/alien/cairo-jpeg.c
+++ b/
cairo/alien/cairo-jpeg.c
@@
-393,7
+393,14
@@
cairo_status_t stdio_write_func (void *closure,
const unsigned char *data,
unsigned int length)
{
const unsigned char *data,
unsigned int length)
{
- return fwrite(data, 1, length, (FILE *)closure);
+ int bytes_written;
+ do {
+ bytes_written = fwrite(data, 1, length, (FILE *)closure);
+ data += bytes_written;
+ length -= bytes_written;
+ } while (bytes_written > 0 && length > 0);
+
+ return CAIRO_STATUS_SUCCESS;
}
/*
}
/*