projects
/
henge
/
apc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
c71abb8
)
fixt
author
ken
<ken@mihrtec.com>
Fri, 17 Feb 2017 00:50:07 +0000
(16:50 -0800)
committer
ken
<ken@mihrtec.com>
Fri, 17 Feb 2017 00:50:07 +0000
(16:50 -0800)
src/binaryout.c
patch
|
blob
|
history
diff --git
a/src/binaryout.c
b/src/binaryout.c
index
ffb4021
..
94f8c29
100644
(file)
--- a/
src/binaryout.c
+++ b/
src/binaryout.c
@@
-838,29
+838,18
@@
bin_process_pixel
int init_height,
int init_width
)
int init_height,
int init_width
)
-{ struct bin_pixel_node_t* pixel_node;
-
-
- pixel_node = struct_alloc(bin_pixel_node_t);
-
- if(data)
- { /* get ref from 4 bytes of data */
+{ struct bin_pixel_node_t* pixel_node = NULL;
+ if(*data)
+ { pixel_node = struct_alloc(bin_pixel_node_t);
+ /* get ref from 4 bytes of data */
pixel_node->data.ref = (int) data;
/* bitshift by ? to get Z */
pixel_node->data.z = ((int) data << 24);
pixel_node->data.ref = (int) data;
/* bitshift by ? to get Z */
pixel_node->data.z = ((int) data << 24);
-
/* set x and y */
pixel_node->data.x = x + init_width ;
pixel_node->data.y = y + init_width;
/* set x and y */
pixel_node->data.x = x + init_width ;
pixel_node->data.y = y + init_width;
- data += 4;
}
}
- else
- { data += 4; //TODO: does this correctly increment past 0x00000000?
- return NULL;
- }
-
-
-
+ *data += 4;
return pixel_node;
}
return pixel_node;
}