Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTon Roosendaal <ton@blender.org>2004-12-21 21:49:31 +0300
committerTon Roosendaal <ton@blender.org>2004-12-21 21:49:31 +0300
commit8cf7f44047224f00ffa611ee05a698e8f41e0db6 (patch)
treeaff9bcc68c28062b533a65b51a7eee014272c28e
parent2d7289f3f5df02ef9fd1266f9b9842dfb84b58ae (diff)
Eeek! last minute error.
Commit of dec 9... still uses fopen(name, "ab") instead of "wb" Caused targa and bmp files to write wrong on save-over, appended instead.
-rw-r--r--source/blender/imbuf/intern/bmp.c2
-rw-r--r--source/blender/imbuf/intern/targa.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/imbuf/intern/bmp.c b/source/blender/imbuf/intern/bmp.c
index 2cd9e35ba88..9ef70a824ef 100644
--- a/source/blender/imbuf/intern/bmp.c
+++ b/source/blender/imbuf/intern/bmp.c
@@ -206,7 +206,7 @@ short imb_savebmp(struct ImBuf *ibuf, char *name, int flags) {
bytesize = (ibuf->x * 3 + extrabytes) * ibuf->y;
data = (uchar *) ibuf->rect;
- ofile = fopen(name,"ab");
+ ofile = fopen(name,"wb");
putShortLSB(19778,ofile); /* "BM" */
putIntLSB(0,ofile); /* This can be 0 for BI_RGB bitmaps */
diff --git a/source/blender/imbuf/intern/targa.c b/source/blender/imbuf/intern/targa.c
index a20c9917c06..40e1b60d36c 100644
--- a/source/blender/imbuf/intern/targa.c
+++ b/source/blender/imbuf/intern/targa.c
@@ -290,7 +290,7 @@ short imb_savetarga(struct ImBuf * ibuf, char *name, int flags)
if (ibuf->depth==32) {
buf[17] |= 0x08;
}
- fildes = fopen(name,"ab");
+ fildes = fopen(name,"wb");
if (fwrite(buf, 1, 18,fildes) != 18) return (0);