1
0
mirror of https://git.FreeBSD.org/src.git synced 2025-01-26 16:18:31 +00:00

Fix a bug that would occur in application death when debugging was enabled

if you ended up in f_dialog_*_constrain() (indirectly, of course) with a
purposefully-set NULL height, width, or rows parameter (because you didn't
care to have that attribute calculated). Fix typo in a comment while here.

Approved by:	re (glebius)
This commit is contained in:
Devin Teske 2013-10-11 20:07:04 +00:00
parent 6b48eebec6
commit efa13f7e0b
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=256330

View File

@ -415,8 +415,8 @@ f_dialog_size_constrain()
if [ "$debug" ]; then
# Print final constrained values to debugging
f_quietly f_getvar "$__var_height"
f_quietly f_getvar "$__var_width"
[ "$__var_height" ] && f_quietly f_getvar "$__var_height"
[ "$__var_width" ] && f_quietly f_getvar "$__var_width"
fi
return $__retval # success if no debug warnings were printed
@ -532,10 +532,10 @@ f_dialog_menu_constrain()
fi
if [ "$debug" ]; then
# Print final constrained values to debuggin
f_quietly f_getvar "$__var_height"
f_quietly f_getvar "$__var_width"
f_quietly f_getvar "$__var_rows"
# Print final constrained values to debugging
[ "$__var_height" ] && f_quietly f_getvar "$__var_height"
[ "$__var_width" ] && f_quietly f_getvar "$__var_width"
[ "$__var_rows" ] && f_quietly f_getvar "$__var_rows"
fi
return $__retval # success if no debug warnings were printed