forked from mia/Aegisub
Fix use of uninitialized variable when setting margins to an empty string
Originally committed to SVN as r6322.
This commit is contained in:
parent
4675dbb29d
commit
2bc43eb886
1 changed files with 2 additions and 8 deletions
|
@ -372,15 +372,9 @@ void AssDialogue::SetMarginString(const wxString origvalue,int which) {
|
|||
}
|
||||
|
||||
// Get value
|
||||
long value;
|
||||
long value = 0;
|
||||
strvalue.ToLong(&value);
|
||||
|
||||
// Cap it
|
||||
if (value < 0) value = 0;
|
||||
if (value > 9999) value = 9999;
|
||||
|
||||
// Assign
|
||||
Margin[which] = value;
|
||||
Margin[which] = mid<int>(0, value, 9999);
|
||||
}
|
||||
|
||||
wxString AssDialogue::GetMarginString(int which,bool pad) const {
|
||||
|
|
Loading…
Reference in a new issue