diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2013-03-12 17:18:39 +0400 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2013-03-12 17:18:39 +0400 |
commit | b3ff0d6d2a95f461ae53c4e61b106b45c7aff48c (patch) | |
tree | 0073b1825a3c63cf1bc99187657fac34c1f8cce1 /source/blender/blenkernel/intern/pointcache.c | |
parent | d74e0299543b862c17d73048bcfb2534291e6e9a (diff) |
Temp fix for stupid -Wformat-security issue.
Also makes more use of BLI_snprintf, and makes more consistent code acrross all "header strings" generation in transform.c.
Diffstat (limited to 'source/blender/blenkernel/intern/pointcache.c')
-rw-r--r-- | source/blender/blenkernel/intern/pointcache.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/source/blender/blenkernel/intern/pointcache.c b/source/blender/blenkernel/intern/pointcache.c index c318356fd2a..c900d08e4e9 100644 --- a/source/blender/blenkernel/intern/pointcache.c +++ b/source/blender/blenkernel/intern/pointcache.c @@ -840,7 +840,10 @@ static int ptcache_dynamicpaint_read(PTCacheFile *pf, void *dp_v) /* version header */ ptcache_file_read(pf, version, 1, sizeof(char) * 4); - if (strncmp(version, DPAINT_CACHE_VERSION, 4)) {printf("Dynamic Paint: Invalid cache version: %s!\n", version); return 0;} + if (strncmp(version, DPAINT_CACHE_VERSION, 4)) { + printf("Dynamic Paint: Invalid cache version: %s!\n", version); + return 0; + } if (surface->format != MOD_DPAINT_SURFACE_F_IMAGESEQ && surface->data) { unsigned int data_len; @@ -1516,7 +1519,7 @@ static int ptcache_file_compressed_write(PTCacheFile *pf, unsigned char *in, uns if (mode == 2) { r = LzmaCompress(out, &out_len, in, in_len, //assume sizeof(char)==1.... - props, &sizeOfIt, 5, 1 << 24, 3, 0, 2, 32, 2); + props, &sizeOfIt, 5, 1 << 24, 3, 0, 2, 32, 2); if (!(r == SZ_OK) || (out_len >= in_len)) compressed = 0; |