[hamradio-commits] [gnss-sdr] 152/251: ensure that an index cannot be negative
Carles Fernandez
carles_fernandez-guest at moszumanska.debian.org
Wed Sep 2 00:22:45 UTC 2015
This is an automated email from the git hooks/post-receive script.
carles_fernandez-guest pushed a commit to branch master
in repository gnss-sdr.
commit f243455c1874de0ef411d50908d61cf1723b45e0
Author: Carles Fernandez <carles.fernandez at gmail.com>
Date: Fri May 29 18:45:39 2015 +0200
ensure that an index cannot be negative
---
src/algorithms/PVT/libs/rinex_printer.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/algorithms/PVT/libs/rinex_printer.h b/src/algorithms/PVT/libs/rinex_printer.h
index a7573ff..604309d 100644
--- a/src/algorithms/PVT/libs/rinex_printer.h
+++ b/src/algorithms/PVT/libs/rinex_printer.h
@@ -530,8 +530,8 @@ inline std::string& Rinex_Printer::sci2for(std::string& aStr,
{
redoexp = true;
// Swap digit and decimal.
- aStr[idx] = aStr[idx - 1];
- aStr[idx - 1] = '.';
+ aStr[static_cast<unsigned int>(idx)] = aStr[static_cast<unsigned int>(idx - 1)];
+ aStr[static_cast<unsigned int>(idx - 1)] = '.';
// Only add one to the exponent if the number is non-zero
if (asDouble(aStr.substr(startPos, length)) != 0.0)
expAdd = 1;
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-hamradio/gnss-sdr.git
More information about the pkg-hamradio-commits
mailing list