Commit d54236cbc7439b64aed13a4778f3a12958d38aa3
1 parent
f800ddb8
Exists in
master
and in
3 other branches
HLLAPI passa a converter o charset do terminal, funcao lib3270_get_text estava a…
…ceitando gets maiores que o tamanho do terminal, implementacao da funcao HLLAPI para obter o buffer do terminal, HLLAPI estava fechando a pipe de comunicacao logo apos a conexao
Showing
1 changed file
with
2 additions
and
4 deletions
Show diff stats
selection.c
... | ... | @@ -464,11 +464,9 @@ LIB3270_EXPORT char * lib3270_get_text(H3270 *h, int offset, int len) |
464 | 464 | if(!lib3270_connected(h)) |
465 | 465 | return NULL; |
466 | 466 | |
467 | - maxlen = h->rows * (h->cols+1); | |
467 | + maxlen = (h->rows * (h->cols+1)) - offset; | |
468 | 468 | |
469 | - if(len < 0) | |
470 | - len = (maxlen - offset); | |
471 | - else if(len > maxlen) | |
469 | + if(len < 0 || len > maxlen) | |
472 | 470 | len = maxlen; |
473 | 471 | |
474 | 472 | buffer = lib3270_malloc(len+1); | ... | ... |