From 4c814798c7bc7f6a0f92c21b027b26290622aa2f Mon Sep 17 00:00:00 2001 From: George Hazan Date: Fri, 19 Jun 2015 19:35:42 +0000 Subject: SIZEOF replaced with more secure analog - _countof git-svn-id: http://svn.miranda-ng.org/main/trunk@14270 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/SpellChecker/src/autoreplace.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'plugins/SpellChecker/src/autoreplace.cpp') diff --git a/plugins/SpellChecker/src/autoreplace.cpp b/plugins/SpellChecker/src/autoreplace.cpp index c22a1fe5aa..283a1ea6db 100644 --- a/plugins/SpellChecker/src/autoreplace.cpp +++ b/plugins/SpellChecker/src/autoreplace.cpp @@ -33,7 +33,7 @@ AutoReplacement::AutoReplacement(const TCHAR *replace, BOOL useVariables) AutoReplaceMap::AutoReplaceMap(TCHAR *aFilename, Dictionary *dict) { this->dict = dict; - mir_tstrncpy(filename, aFilename, SIZEOF(filename)); + mir_tstrncpy(filename, aFilename, _countof(filename)); loadAutoReplaceMap(); } @@ -47,7 +47,7 @@ void AutoReplaceMap::loadAutoReplaceMap() char c; int pos = 0; while ((c = fgetc(file)) != EOF) { - if (c == '\n' || c == '\r' || pos >= SIZEOF(tmp) - 1) { + if (c == '\n' || c == '\r' || pos >= _countof(tmp) - 1) { if (pos > 0) { tmp[pos] = '\0'; -- cgit v1.2.3