summaryrefslogtreecommitdiff
path: root/cmd/cmd_read.c
diff options
context:
space:
mode:
Diffstat (limited to 'cmd/cmd_read.c')
-rw-r--r--cmd/cmd_read.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/cmd/cmd_read.c b/cmd/cmd_read.c
index da1988c..8c1c594 100644
--- a/cmd/cmd_read.c
+++ b/cmd/cmd_read.c
@@ -22,6 +22,8 @@ int c_read( cmd_arg_t *arg )
char *buf_ptr;
int sz;
g_buf->get_ptr(&buf_ptr,&sz);
+ sz = g_buf->size();
+ //printf("sz %d ptr %lx",sz,buf_ptr);
ret = file_read_blk( g_file, (uint8_t *)buf_ptr, sz );
printf("Readed %d bytes\n", ret);
if ( (ret >= 0) && (ret <= g_buf->size()) )