Fix pxj length

This commit is contained in:
pancake 2017-12-17 13:48:17 +01:00
parent 6fe48495b2
commit 2b841d27ad
2 changed files with 6 additions and 1 deletions

View File

@ -113,6 +113,7 @@ R_API void r_bp_plugin_list(RBreakpoint *bp);
R_API int r_bp_in(RBreakpoint *bp, ut64 addr, int rwx);
// deprecate?
R_API int r_bp_list(RBreakpoint *bp, int rad);
R_API int r_bp_size(RBreakpoint *bp);
/* bp item attribs setters */
R_API int r_bp_get_bytes(RBreakpoint *bp, ut8 *buf, int len, int endian, int idx);

View File

@ -1843,7 +1843,11 @@ R_API int r_print_jsondump(RPrint *p, const ut8 *buf, int len, int wordsize) {
if (!p || !buf || len < 1 || wordsize < 1) {
return 0;
}
int i, words = (len / wordsize);
int bytesize = wordsize / 8;
if (bytesize < 1) {
bytesize = 8;
}
int i, words = (len / bytesize);
p->cb_printf ("[");
for (i = 0; i < words; i++) {
ut16 w16 = r_read_ble16 (&buf16[i], p->big_endian);