Permalink
Browse files

tga.c should now support reading/writing all variants of targa files.…

… XS needs

updating for writing targa files.  Also fixed a misplaced parenthesis in malloc
debug code.
  • Loading branch information...
Arnar Mar Hrafnkelsson
Arnar Mar Hrafnkelsson committed Oct 22, 2001
1 parent c3cc977 commit 76ff75b8c05625d532518113a5baddb2fc0a1196
Showing with 288 additions and 91 deletions.
  1. +2 −2 io.c
  2. +286 −89 tga.c
View
4 io.c
@@ -144,7 +144,7 @@ myrealloc_file_line(void *ptr, size_t newsize, char* file, int line) {
exit(3);
}
- if ( (buf = realloc(ptr-UNDRRNVAL, UNDRRNVAL+OVERRNVAL+newsize) == NULL) ) {
+ if ( (buf = realloc(ptr-UNDRRNVAL, UNDRRNVAL+OVERRNVAL+newsize)) == NULL ) {
mm_log((1,"Unable to reallocate %i bytes at %p for %s (%i)\n", newsize, ptr, file, line));
exit(3);
}
@@ -181,7 +181,7 @@ void
bndcheck_all() {
int idx;
mm_log((1, "bndcheck_all()\n"));
-for(idx=0; idx<MAXMAL; idx++)
+ for(idx=0; idx<MAXMAL; idx++)
if (malloc_pointers[idx].ptr)
bndcheck(idx);
}
Oops, something went wrong.

0 comments on commit 76ff75b

Please sign in to comment.