diff options
author | Oswald Buddenhagen <oswald.buddenhagen@nokia.com> | 2012-08-24 14:49:13 +0200 |
---|---|---|
committer | Oswald Buddenhagen <oswald.buddenhagen@nokia.com> | 2012-08-28 14:33:29 +0200 |
commit | e3821380524f1fa75a6e38a3d1dad728ff3b48e8 (patch) | |
tree | a39cd1883b0490790505b954a61d4cf5e17ce267 /src/shared | |
parent | 662e6f111932a5715a4f575dbbab190a930e3776 (diff) | |
download | qt-creator-e3821380524f1fa75a6e38a3d1dad728ff3b48e8.tar.gz |
fix ProString::mid() without second parameter
we need to interpret the -1 as unsigned for it to mean "unlimited".
Change-Id: I130b809749fa1679a5b2444286baf48cc095c7bf
Reviewed-by: Daniel Teske <daniel.teske@nokia.com>
Diffstat (limited to 'src/shared')
-rw-r--r-- | src/shared/proparser/proitems.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/shared/proparser/proitems.cpp b/src/shared/proparser/proitems.cpp index e51e724eee..962268ca7d 100644 --- a/src/shared/proparser/proitems.cpp +++ b/src/shared/proparser/proitems.cpp @@ -299,7 +299,7 @@ ProString ProString::mid(int off, int len) const off = m_length; ret.m_offset += off; ret.m_length -= off; - if (ret.m_length > len) + if ((uint)ret.m_length > (uint)len) // Unsigned comparison to interpret < 0 as infinite ret.m_length = len; return ret; } |