@@ -201,7 +201,6 @@ class AutoString
201201 strValue = value;
202202 }
203203 int strLen = 0 ;
204- size_t writtenLen = 0 ;
205204 size_t actualLen = 0 ;
206205 if (errorCode == JsNoError)
207206 {
@@ -210,19 +209,19 @@ class AutoString
210209 {
211210 // Assume ascii characters
212211 data = (char *)malloc ((strLen + 1 ) * sizeof (char ));
213- errorCode = ChakraRTInterface::JsCopyString (strValue, data, strLen, &writtenLen , &actualLen);
212+ errorCode = ChakraRTInterface::JsCopyString (strValue, data, strLen, &length , &actualLen);
214213 if (errorCode == JsNoError)
215214 {
216215 // If non-ascii, take slow path
217- if (writtenLen != actualLen)
216+ if (length != actualLen)
218217 {
219218 free (data);
220219 data = (char *)malloc ((actualLen + 1 ) * sizeof (char ));
221220
222- errorCode = ChakraRTInterface::JsCopyString (strValue, data, actualLen + 1 , &writtenLen , nullptr );
221+ errorCode = ChakraRTInterface::JsCopyString (strValue, data, actualLen + 1 , &length , nullptr );
223222 if (errorCode == JsNoError)
224223 {
225- AssertMsg (actualLen == writtenLen , " If you see this message.. There is something seriously wrong. Good Luck!" );
224+ AssertMsg (actualLen == length , " If you see this message.. There is something seriously wrong. Good Luck!" );
226225
227226 }
228227 }
0 commit comments