Mercurial > vim
comparison src/libvterm/src/parser.c @ 19091:1c75e1974313 v8.2.0106
patch 8.2.0106: printf formats are not exactly right
Commit: https://github.com/vim/vim/commit/b16ad968499aeb29b6ff9be6cc64fb41522a4a5e
Author: Bram Moolenaar <Bram@vim.org>
Date: Wed Jan 8 22:06:14 2020 +0100
patch 8.2.0106: printf formats are not exactly right
Problem: Printf formats are not exactly right.
Solution: Adjust signed/unsigned conversions. (Frazer Clews, closes https://github.com/vim/vim/issues/5456)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Wed, 08 Jan 2020 22:15:03 +0100 |
parents | 8b4f9be5db73 |
children | 1d595fada804 |
comparison
equal
deleted
inserted
replaced
19090:df1cb3cd21ab | 19091:1c75e1974313 |
---|---|
63 | 63 |
64 static void append_strbuffer(VTerm *vt, const char *str, size_t len) | 64 static void append_strbuffer(VTerm *vt, const char *str, size_t len) |
65 { | 65 { |
66 if(len > vt->parser.strbuffer_len - vt->parser.strbuffer_cur) { | 66 if(len > vt->parser.strbuffer_len - vt->parser.strbuffer_cur) { |
67 len = vt->parser.strbuffer_len - vt->parser.strbuffer_cur; | 67 len = vt->parser.strbuffer_len - vt->parser.strbuffer_cur; |
68 DEBUG_LOG1("Truncating strbuffer preserve to %zd bytes\n", len); | 68 DEBUG_LOG1("Truncating strbuffer preserve to %zu bytes\n", len); |
69 } | 69 } |
70 | 70 |
71 if(len > 0) { | 71 if(len > 0) { |
72 strncpy(vt->parser.strbuffer + vt->parser.strbuffer_cur, str, len); | 72 strncpy(vt->parser.strbuffer + vt->parser.strbuffer_cur, str, len); |
73 vt->parser.strbuffer_cur += len; | 73 vt->parser.strbuffer_cur += len; |