Dear TerraGear guru,
On my plateforme (Linux 2.6.15-27-amd64-generic with Ubuntu Dapper)
raw2ascii enter a loop while reading the dem30 header file.
Whithout understanding any C++ character handling, I just modified an
easy while condition in
TerraGear-0.0/source/src/Prep/DemRaw2ascii/rawdem.c and it worked fine.
Here, rawReadDemHdr returned i = 1 after the last consistant line.
Following is a patch for it.
Cheers,
Alexis
Index: rawdem.c
===================================================================
RCS file: /var/cvs/TerraGear-0.0/source/src/Prep/DemRaw2ascii/rawdem.c,v
retrieving revision 1.11
diff -u -p -r1.11 rawdem.c
--- rawdem.c 19 Nov 2004 22:25:51 -0000 1.11
+++ rawdem.c 26 Jan 2007 20:28:32 -0000
@@ -98,7 +98,7 @@ void rawReadDemHdr( fgRAWDEM *raw, char
raw->big_endian = 1;
/* process each line */
- while ( (reads(fileno(hdr), line, 256) != 0) ) {
+ while ( (reads(fileno(hdr), line, 256) > 1) ) {
printf("%s", line);
len = strlen(line);
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Flightgear-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/flightgear-devel