mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-06-30 19:12:48 -05:00
Various uninitialised-variable accesses picked up by valgrind.
[originally from svn r3723]
This commit is contained in:
39
terminal.c
39
terminal.c
@ -850,26 +850,29 @@ static void scroll(Terminal *term, int topline, int botline, int lines, int sb)
|
||||
*/
|
||||
seltop = sb ? -term->savelines : topline;
|
||||
|
||||
if (term->selstart.y >= seltop &&
|
||||
term->selstart.y <= botline) {
|
||||
term->selstart.y--;
|
||||
if (term->selstart.y < seltop) {
|
||||
term->selstart.y = seltop;
|
||||
term->selstart.x = 0;
|
||||
if (term->selstate != NO_SELECTION) {
|
||||
if (term->selstart.y >= seltop &&
|
||||
term->selstart.y <= botline) {
|
||||
term->selstart.y--;
|
||||
if (term->selstart.y < seltop) {
|
||||
term->selstart.y = seltop;
|
||||
term->selstart.x = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (term->selend.y >= seltop && term->selend.y <= botline) {
|
||||
term->selend.y--;
|
||||
if (term->selend.y < seltop) {
|
||||
term->selend.y = seltop;
|
||||
term->selend.x = 0;
|
||||
if (term->selend.y >= seltop && term->selend.y <= botline) {
|
||||
term->selend.y--;
|
||||
if (term->selend.y < seltop) {
|
||||
term->selend.y = seltop;
|
||||
term->selend.x = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (term->selanchor.y >= seltop && term->selanchor.y <= botline) {
|
||||
term->selanchor.y--;
|
||||
if (term->selanchor.y < seltop) {
|
||||
term->selanchor.y = seltop;
|
||||
term->selanchor.x = 0;
|
||||
if (term->selanchor.y >= seltop &&
|
||||
term->selanchor.y <= botline) {
|
||||
term->selanchor.y--;
|
||||
if (term->selanchor.y < seltop) {
|
||||
term->selanchor.y = seltop;
|
||||
term->selanchor.x = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user