From b2e56967c45bd8de265e8863d9c94dec72d124ce Mon Sep 17 00:00:00 2001 From: FreeArtMan Date: Sun, 29 Sep 2019 11:20:01 +0100 Subject: Read max buffer size possible --- cmd/cmd_read.c | 2 ++ 1 file changed, 2 insertions(+) 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()) ) -- cgit v1.2.3