Skip to content

Commit 0bf9dd2

Browse files
committed
A function that invokes va_start, shall also invoke va_end before it returns.
1 parent c137b97 commit 0bf9dd2

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Dmetaph.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,8 +109,10 @@ bool MString::StringAt(int start, int length, ... )
109109
do
110110
{
111111
test = va_arg(sstrings, char*);
112-
if(*test AND (target == test))
112+
if(*test AND (target == test)) {
113+
va_end(sstrings);
113114
return true;
115+
}
114116

115117
}while(strcmp(test, ""));
116118

0 commit comments

Comments
 (0)