mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-04-21 04:55:02 -05:00
Various uninitialised-variable accesses picked up by valgrind.
[originally from svn r3723]
This commit is contained in:
parent
6d7cc86470
commit
0f259c23ea
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;
|
seltop = sb ? -term->savelines : topline;
|
||||||
|
|
||||||
if (term->selstart.y >= seltop &&
|
if (term->selstate != NO_SELECTION) {
|
||||||
term->selstart.y <= botline) {
|
if (term->selstart.y >= seltop &&
|
||||||
term->selstart.y--;
|
term->selstart.y <= botline) {
|
||||||
if (term->selstart.y < seltop) {
|
term->selstart.y--;
|
||||||
term->selstart.y = seltop;
|
if (term->selstart.y < seltop) {
|
||||||
term->selstart.x = 0;
|
term->selstart.y = seltop;
|
||||||
|
term->selstart.x = 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
if (term->selend.y >= seltop && term->selend.y <= botline) {
|
||||||
if (term->selend.y >= seltop && term->selend.y <= botline) {
|
term->selend.y--;
|
||||||
term->selend.y--;
|
if (term->selend.y < seltop) {
|
||||||
if (term->selend.y < seltop) {
|
term->selend.y = seltop;
|
||||||
term->selend.y = seltop;
|
term->selend.x = 0;
|
||||||
term->selend.x = 0;
|
}
|
||||||
}
|
}
|
||||||
}
|
if (term->selanchor.y >= seltop &&
|
||||||
if (term->selanchor.y >= seltop && term->selanchor.y <= botline) {
|
term->selanchor.y <= botline) {
|
||||||
term->selanchor.y--;
|
term->selanchor.y--;
|
||||||
if (term->selanchor.y < seltop) {
|
if (term->selanchor.y < seltop) {
|
||||||
term->selanchor.y = seltop;
|
term->selanchor.y = seltop;
|
||||||
term->selanchor.x = 0;
|
term->selanchor.x = 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -152,6 +152,8 @@ static void dlg_init(struct dlgparam *dp)
|
|||||||
dp->coloursel_result.ok = FALSE;
|
dp->coloursel_result.ok = FALSE;
|
||||||
dp->treeitems = NULL;
|
dp->treeitems = NULL;
|
||||||
dp->window = dp->cancelbutton = dp->currtreeitem = NULL;
|
dp->window = dp->cancelbutton = dp->currtreeitem = NULL;
|
||||||
|
dp->flags = 0;
|
||||||
|
dp->currfocus = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void dlg_cleanup(struct dlgparam *dp)
|
static void dlg_cleanup(struct dlgparam *dp)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user