diff options
Diffstat (limited to 'cmd/cmd_dumps.c')
-rw-r--r-- | cmd/cmd_dumps.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/cmd/cmd_dumps.c b/cmd/cmd_dumps.c index ecc5143..61d4c84 100644 --- a/cmd/cmd_dumps.c +++ b/cmd/cmd_dumps.c @@ -5,7 +5,7 @@ #include "libcmd/cmd_parse.h" extern file_t *g_file; -extern buf_t *g_buf; +extern Buf *g_buf; extern int g_flags; int c_dumps( cmd_arg_t *arg ) @@ -20,11 +20,13 @@ int c_dumps( cmd_arg_t *arg ) return -1; } - for (i=0; i<g_buf->size; i++) + for (i=0; i<g_buf->size(); i++) { - if (isprint(g_buf->buf[i])) + char c; + g_buf->getc(i,&c); + if (isprint(c)) { - printf("%c", g_buf->buf[i]); + printf("%c", c); } else { printf("\e[7m.\e[0m"); |