diff options
author | John-Mark Bell <jmb@netsurf-browser.org> | 2013-01-26 22:04:26 +0000 |
---|---|---|
committer | John-Mark Bell <jmb@netsurf-browser.org> | 2013-01-26 22:05:16 +0000 |
commit | 23e16e020e40807d1e7e099d06af9b56cb426149 (patch) | |
tree | 66e8a336c6708210fbc4d1eb69ef5dee899e838a /riscos | |
parent | 30dfa090085f9b0b21ea5181795e9f6930292897 (diff) | |
download | netsurf-23e16e020e40807d1e7e099d06af9b56cb426149.tar.gz netsurf-23e16e020e40807d1e7e099d06af9b56cb426149.tar.bz2 |
Initialise return values in error cases, too: core code is horrifically lax at checking errors from these APIs.
Diffstat (limited to 'riscos')
-rw-r--r-- | riscos/font.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/riscos/font.c b/riscos/font.c index 326cca973..8d4c6d337 100644 --- a/riscos/font.c +++ b/riscos/font.c @@ -255,6 +255,7 @@ bool nsfont_width(const plot_font_style_t *fstyle, else LOG(("rufl_width: 0x%x", code)); /* warn_user("MiscError", "font error"); */ + *width = 0; return false; } @@ -303,6 +304,8 @@ bool nsfont_position_in_string(const plot_font_style_t *fstyle, else LOG(("rufl_x_to_offset: 0x%x", code)); /* warn_user("MiscError", "font error"); */ + *char_offset = 0; + *actual_x = 0; return false; } @@ -355,6 +358,8 @@ bool nsfont_split(const plot_font_style_t *fstyle, else LOG(("rufl_split: 0x%x", code)); /* warn_user("MiscError", "font error"); */ + *char_offset = 0; + *actual_x = 0; return false; } @@ -386,6 +391,8 @@ bool nsfont_split(const plot_font_style_t *fstyle, else LOG(("rufl_width: 0x%x", code)); /* warn_user("MiscError", "font error"); */ + *char_offset = 0; + *actual_x = 0; return false; } |