diff --git a/src/term.c b/src/term.c index 1b563f46..65e5c850 100644 --- a/src/term.c +++ b/src/term.c @@ -518,6 +518,16 @@ static size_t maxstrlen(int argc, char **argv) { return max; } + +// Change data item p of size bytes from big endian to little endian and vice versa +static void change_endian(void *p, int size) { + uint8_t tmp, *w = p; + + for(int i=0; i 1) + change_endian(data.a, data.size); } if(data.str_ptr) {