[commit] r2072 - trunk/GME/Common
GMESRC Repository Notifications
gme-commit at list.isis.vanderbilt.edu
Thu Sep 27 13:12:09 CDT 2012
Author: ksmyth
Date: Thu Sep 27 13:12:08 2012
New Revision: 2072
Log:
Compile under NOMINMAX
Modified:
trunk/GME/Common/CommonMfc.h
Modified: trunk/GME/Common/CommonMfc.h
==============================================================================
--- trunk/GME/Common/CommonMfc.h Thu Sep 27 13:11:58 2012 (r2071)
+++ trunk/GME/Common/CommonMfc.h Thu Sep 27 13:12:08 2012 (r2072)
@@ -232,7 +232,11 @@
if (charsInLine == 0)
return _T("");
// n.b. CEdit::GetLine sends EM_GETLINE, so it must set the first word to the buffer size
- int charsInBuffer = max(sizeof(void*), charsInLine+1);
+ int charsInBuffer = charsInLine+1;
+ if (charsInBuffer < sizeof(void*))
+ {
+ charsInBuffer = sizeof(void*);
+ }
CString ret;
// n.b. the CEdit::GetLine MSDN documentation is wrong: GetLine returns the number of characters (not bytes)
// CEdit::GetLine returns (int)::SendMessage(...EM_GETLINE...) and the EM_GETLINE docs specify characters
More information about the gme-commit
mailing list