diff --git a/src/checkbufferoverrun.cpp b/src/checkbufferoverrun.cpp index 5be8dbefa..d07e09782 100644 --- a/src/checkbufferoverrun.cpp +++ b/src/checkbufferoverrun.cpp @@ -526,7 +526,7 @@ void CheckBufferOverrunClass::CheckBufferOverrun_StructVariable() const char *varname[3] = {0, 0, 0}; varname[1] = tok2->strAt(ivar); int arrsize = std::atoi(tok2->strAt(ivar + 2)); - int total_size = arrsize * _tokenizer->SizeOfType(tok2->next()->aaaa()); + int total_size = arrsize * _tokenizer->SizeOfType(tok2->strAt(1)); if (total_size == 0) continue; diff --git a/test/testtokenize.cpp b/test/testtokenize.cpp index 987401d35..f710879af 100644 --- a/test/testtokenize.cpp +++ b/test/testtokenize.cpp @@ -200,7 +200,7 @@ private: tokenizer.tokenize(istr, "test.cpp"); // Expected result.. - ASSERT_EQUALS(std::string(10000, 'a'), std::string(tokenizer.tokens()->aaaa())); + ASSERT_EQUALS(std::string(10000, 'a'), tokenizer.tokens()->str()); }