Opened 15 years ago
Closed 15 years ago
#2974 closed defect (fixed)
Inconsistent return values in msGetLabelSize()
Reported by: | dmorissette | Owned by: | dmorissette |
---|---|---|---|
Priority: | normal | Milestone: | 5.4 release |
Component: | MapServer C Library | Version: | unspecified |
Severity: | normal | Keywords: | |
Cc: | tbonfort, sdlime |
Description
While working on ticket #2973, I realized that the return value of msGetlabelSize() was not properly handled everywhere. In some places we look for MS_FAILURE and in others we look for -1.
Since there seems to be more code looking for -1 than for MS_FAILURE, I think we should align every call to check for -1.
Change History (4)
comment:1 by , 15 years ago
Cc: | added; removed |
---|
comment:2 by , 15 years ago
comment:3 by , 15 years ago
Note that in 5.4 (contrary to 5.2) the inconsistency doesn't seem to cause a crash, at least not with my testcase: we just get a map with no labels.
With the patch in r8893 we get an actual "Font not found" error message as one would expect.
comment:4 by , 15 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Backported the fix to the 5.4 branch in r8904 (will be in 5.4.0rc2).
I have committed a patch for this in SVN trunk r8893.
Steve, Thomas, do you think we should backport this to the 5.4 branch?