Mercurial > octave
changeset 31911:cdde21868c2d stable
avoid clang warning about possible* buffer overflow
(*) Actual overflow could have only occurred for extremely large
screen sizes, but we might as well avoid the warning.
* Vt102Emulation.cpp (Vt102Emulation::reportCursorPosition):
Increase buffer from 20 to 32 bytes.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Mon, 20 Mar 2023 02:34:14 -0400 |
parents | 31f9e97759b4 |
children | e1a3ebecc4f0 8eeb49ec16d8 |
files | libgui/qterminal/libqterminal/unix/Vt102Emulation.cpp |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/libgui/qterminal/libqterminal/unix/Vt102Emulation.cpp Mon Mar 20 12:51:04 2023 -0400 +++ b/libgui/qterminal/libqterminal/unix/Vt102Emulation.cpp Mon Mar 20 02:34:14 2023 -0400 @@ -826,7 +826,7 @@ */ void Vt102Emulation::reportCursorPosition() -{ char tmp[20]; +{ char tmp[32]; sprintf(tmp,"\033[%d;%dR",_currentScreen->getCursorY()+1,_currentScreen->getCursorX()+1); sendString(tmp); }