summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCharles Yin <charles.yin@nokia.com>2010-07-16 11:17:02 +1000
committerCharles Yin <charles.yin@nokia.com>2010-07-16 11:35:07 +1000
commit3a51462bfb3cca8c90e1c690cf045b371d2ab393 (patch)
tree2e3af0a3100c669328e5f3b0348f507075da7e30 /src
parentf95a1d74c6a8672aac180ff8d9e8ba2e13074865 (diff)
downloadqt4-tools-3a51462bfb3cca8c90e1c690cf045b371d2ab393.tar.gz
Fixes the Oracle invalid date bug when date is greater or equal to 2800
By converting the char into unsigned char to avoid the overflow when getting the century from a char for years greater or equal to 2800. Task-number: QTBUG-8210 Reviewed-by: Michael Goddard
Diffstat (limited to 'src')
-rw-r--r--src/sql/drivers/oci/qsql_oci.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/sql/drivers/oci/qsql_oci.cpp b/src/sql/drivers/oci/qsql_oci.cpp
index 2f0cfdce58..c56b9955b5 100644
--- a/src/sql/drivers/oci/qsql_oci.cpp
+++ b/src/sql/drivers/oci/qsql_oci.cpp
@@ -648,7 +648,7 @@ QByteArray qMakeOraDate(const QDateTime& dt)
QDateTime qMakeDate(const char* oraDate)
{
- int century = oraDate[0];
+ int century = uchar(oraDate[0]);
if(century >= 100){
int year = uchar(oraDate[1]);
year = ((century-100)*100) + (year-100);