[Bf-blender-cvs] [820709c] master: Fix STR_String Capitalize on non Win32

Karsten Weiss noreply at git.blender.org
Thu Dec 15 02:36:07 CET 2016


Commit: 820709c14d3917db86c6c392df75a32d52c53ca2
Author: Karsten Weiss
Date:   Thu Dec 15 12:56:48 2016 +1100
Branches: master
https://developer.blender.org/rB820709c14d3917db86c6c392df75a32d52c53ca2

Fix STR_String Capitalize on non Win32

Harmless since its not used, but good to fix.

===================================================================

M	intern/string/intern/STR_String.cpp

===================================================================

diff --git a/intern/string/intern/STR_String.cpp b/intern/string/intern/STR_String.cpp
index 4ea4513..4612c91 100644
--- a/intern/string/intern/STR_String.cpp
+++ b/intern/string/intern/STR_String.cpp
@@ -545,9 +545,9 @@ STR_String& STR_String::Capitalize()
 	if (this->m_len > 1) _strlwr(this->m_data + 1);
 #else
 	if (this->m_len > 0)
-		this->m_data[0] = (this->m_data[0] >= 'A' && this->m_data[0] <= 'A') ? this->m_data[0] + 'a' - 'A' : this->m_data[0];
+		this->m_data[0] = (this->m_data[0] >= 'a' && this->m_data[0] <= 'z') ? this->m_data[0] + 'A' - 'a' : this->m_data[0];
 	for (int i = 1; i < this->m_len; i++)
-		this->m_data[i] = (this->m_data[i] >= 'a' && this->m_data[i] <= 'z') ? this->m_data[i] + 'A' - 'a' : this->m_data[i];
+		this->m_data[i] = (this->m_data[i] >= 'A' && this->m_data[i] <= 'Z') ? this->m_data[i] + 'a' - 'A' : this->m_data[i];
 #endif
 	return *this;
 }




More information about the Bf-blender-cvs mailing list