https://github.com/libLAS/libLAS/commit/8c4985384453a2df7254f05688b83706723bad7b.patch https://bugs.gentoo.org/789732 From 8c4985384453a2df7254f05688b83706723bad7b Mon Sep 17 00:00:00 2001 From: FX Coudert Date: Wed, 4 Oct 2017 11:51:23 +0200 Subject: [PATCH] fix pointer comparison --- src/gt_citation.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gt_citation.cpp b/src/gt_citation.cpp index 65fce31a..8d3966bc 100644 --- a/src/gt_citation.cpp +++ b/src/gt_citation.cpp @@ -155,7 +155,7 @@ char* ImagineCitationTranslation(char* psCitation, geokey_t keyID) if(p1[0] == '\0' || p1[0] == '\n' || p1[0] == ' ') p1 --; p2 = p1 - 1; - while( p2>0 && (p2[0] == ' ' || p2[0] == '\0' || p2[0] == '\n') ) + while( p2 && (p2[0] == ' ' || p2[0] == '\0' || p2[0] == '\n') ) p2--; if(p2 != p1 - 1) p1 = p2; @@ -198,7 +198,7 @@ char* ImagineCitationTranslation(char* psCitation, geokey_t keyID) if(p1[0] == '\0' || p1[0] == '\n' || p1[0] == ' ') p1 --; char* p2 = p1 - 1; - while( p2>0 && (p2[0] == ' ' || p2[0] == '\0' || p2[0] == '\n') ) + while( p2 && (p2[0] == ' ' || p2[0] == '\0' || p2[0] == '\n') ) p2--; if(p2 != p1 - 1) p1 = p2;