[GiNaC-devel] [PATCH 2/6] check_parameter_G: fix pontential increment of end().
Alexei Sheplyakov
varg at metalica.kh.ua
Sat Aug 8 12:06:36 CEST 2009
Incrementing past-the-end iterator is not permitted by the standard, see
[lib.input.iterators].
---
ginac/inifcns_nstdsums.cpp | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/ginac/inifcns_nstdsums.cpp b/ginac/inifcns_nstdsums.cpp
index b410533..11a91dd 100644
--- a/ginac/inifcns_nstdsums.cpp
+++ b/ginac/inifcns_nstdsums.cpp
@@ -659,6 +659,8 @@ Gparameter::const_iterator check_parameter_G(const Gparameter& a, int scale,
++trailing_zeros;
}
}
+ if (lastnonzero == a.end())
+ return a.end();
return ++lastnonzero;
}
--
1.6.3.3
More information about the GiNaC-devel
mailing list