Opened 17 years ago
Closed 16 years ago
#172 closed defect (fixed)
r.recode truncates last character in rules file.
Reported by: | bgullatt | Owned by: | |
---|---|---|---|
Priority: | major | Milestone: | 6.4.0 |
Component: | Default | Version: | 6.3.0 |
Keywords: | r.recode rules | Cc: | |
CPU: | Unspecified | Platform: | MSWindows XP |
Description
When running r.recode (wingrass63rc5 & qgis0.10.0) the last character in the rules file gets truncated such that it scales the recode by a factor of 10. Work around is to add a zero. Found this when using r.recode to convert from fcell(float) to cell(int) for compatability with existing application built on grass4x.
Tested at command line rather than rules file and got correct values. Problem is in rules file processing.
Attachments (1)
Change History (7)
comment:1 by , 17 years ago
Version: | 6.3.0 RCs → 6.3.0 |
---|
comment:3 by , 16 years ago
CPU: | → Unspecified |
---|---|
Milestone: | 6.3.1 → 6.4.0 |
Platform: | → Unspecified |
comment:4 by , 16 years ago
Platform: | Unspecified → MSWindows XP |
---|---|
Resolution: | → fixed |
Status: | new → closed |
comment:5 by , 16 years ago
Resolution: | fixed |
---|---|
Status: | closed → reopened |
oops, read_rules.c line 73: buf[strlen(buf) - 1] = '\0';
Note:
See TracTickets
for help on using tickets.
Can you replace fgets() with G_getl2() and try again? Untested patch attached.
Markus