diff options
author | FreeArtMan <dos21h@gmail.com> | 2019-09-29 11:20:01 +0100 |
---|---|---|
committer | FreeArtMan <dos21h@gmail.com> | 2019-09-29 11:20:01 +0100 |
commit | b2e56967c45bd8de265e8863d9c94dec72d124ce (patch) | |
tree | ca4c9d7eae76d599a0ec014f8d2d7b085602cb9d | |
parent | 3e187c094f12ef41ea6de2f55d128c3e037b5c12 (diff) | |
download | ihe-b2e56967c45bd8de265e8863d9c94dec72d124ce.tar.gz ihe-b2e56967c45bd8de265e8863d9c94dec72d124ce.zip |
Read max buffer size possible
-rw-r--r-- | cmd/cmd_read.c | 2 |
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()) ) |