{
void*ptr;
if(size == 0) {
- *(int*)0 = 0xdead;
- fprintf(stderr, "Warning: Zero alloc\n");
+ //*(int*)0 = 0xdead;
+ //fprintf(stderr, "Warning: Zero alloc\n");
return 0;
}
{
void*ptr;
if(size == 0) {
- *(int*)0 = 0xdead;
- fprintf(stderr, "Warning: Zero realloc\n");
+ //*(int*)0 = 0xdead;
+ //fprintf(stderr, "Warning: Zero realloc\n");
rfx_free(data);
return 0;
}
{
void*ptr;
if(size == 0) {
- *(int*)0 = 0xdead;
- fprintf(stderr, "Warning: Zero alloc\n");
+ //*(int*)0 = 0xdead;
+ //fprintf(stderr, "Warning: Zero alloc\n");
return 0;
}
#ifdef HAVE_CALLOC
free(ptr);
}
+#ifdef MEMORY_INFO
+long rfx_memory_used()
+{
+}
+
+char* rfx_memory_used_str()
+{
+}
+#endif
+
// internal constants
#define MALLOC_SIZE 128
{
SRECT g;
SPOINT p1,p2,p3,p4,pp1,pp2,pp3,pp4;
+ if(!m)
+ return r;
p1.x = r.xmin;p1.y = r.ymin;
p2.x = r.xmax;p2.y = r.ymin;
p3.x = r.xmin;p3.y = r.ymax;
if (t->len)
{ t->data = (U8*)rfx_alloc(t->len);
t->memsize = t->len;
- if (reader->read(reader, t->data, t->len) != t->len) return NULL;
+ if (reader->read(reader, t->data, t->len) != t->len) {
+ fprintf(stderr, "rfxswf: Warning: Short read (tagid %d). File truncated?\n", t->id);
+ free(t->data);t->data=0;
+ free(t);
+ return NULL;
+ }
}
if (prev)