Skip to content

Commit

Permalink
git-gui: fix git-gui crash due to uninitialized variable
Browse files Browse the repository at this point in the history
Recently, a clone initiated via git gui on Windows crashed on me due to
an "unknown variable cdone". It turns out that there is a code path
where this variable is used uninitialized.

Signed-off-by: Clemens Buchacher <drizzd@aon.at>
Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
  • Loading branch information
Clemens Buchacher authored and Pat Thoyts committed Jan 22, 2012
1 parent 942e6ba commit ba5d445
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/status_bar.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ method start {msg uds} {

method update {have total} {
set pdone 0
set cdone 0
if {$total > 0} {
set pdone [expr {100 * $have / $total}]
set cdone [expr {[winfo width $w_c] * $have / $total}]
Expand Down

0 comments on commit ba5d445

Please sign in to comment.