summaryrefslogtreecommitdiffstats
path: root/src/sql/drivers
diff options
context:
space:
mode:
authorCharles Yin <charles.yin@nokia.com>2010-07-16 01:17:02 (GMT)
committerCharles Yin <charles.yin@nokia.com>2010-07-16 01:35:07 (GMT)
commit3a51462bfb3cca8c90e1c690cf045b371d2ab393 (patch)
tree2e3af0a3100c669328e5f3b0348f507075da7e30 /src/sql/drivers
parentf95a1d74c6a8672aac180ff8d9e8ba2e13074865 (diff)
downloadQt-3a51462bfb3cca8c90e1c690cf045b371d2ab393.zip
Qt-3a51462bfb3cca8c90e1c690cf045b371d2ab393.tar.gz
Qt-3a51462bfb3cca8c90e1c690cf045b371d2ab393.tar.bz2
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/sql/drivers')
-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 2f0cfdc..c56b995 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);