summaryrefslogtreecommitdiff
path: root/geography/opencpn-plugin-weather_routing/patches
diff options
context:
space:
mode:
authorjoerg <joerg@pkgsrc.org>2017-02-08 00:05:55 +0000
committerjoerg <joerg@pkgsrc.org>2017-02-08 00:05:55 +0000
commitdd754ea1ae33cf025f5f53140b7ae0930fb205fa (patch)
tree77b1f04a401e1f2b1492ebd7d8d9d1c988afcab0 /geography/opencpn-plugin-weather_routing/patches
parente80c78129438b49014307d4ca2dfa64b906b76d2 (diff)
downloadpkgsrc-dd754ea1ae33cf025f5f53140b7ae0930fb205fa.tar.gz
Don't order pointer, but check the value intended instead. Bump
revision.
Diffstat (limited to 'geography/opencpn-plugin-weather_routing/patches')
-rw-r--r--geography/opencpn-plugin-weather_routing/patches/patch-src_Polar.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/geography/opencpn-plugin-weather_routing/patches/patch-src_Polar.cpp b/geography/opencpn-plugin-weather_routing/patches/patch-src_Polar.cpp
new file mode 100644
index 00000000000..b096eacf55c
--- /dev/null
+++ b/geography/opencpn-plugin-weather_routing/patches/patch-src_Polar.cpp
@@ -0,0 +1,15 @@
+$NetBSD: patch-src_Polar.cpp,v 1.1 2017/02/08 00:05:55 joerg Exp $
+
+Pointers are not relative to 0, so check correct variable.
+
+--- src/Polar.cpp.orig 2017-01-08 19:55:10.199446917 +0000
++++ src/Polar.cpp
+@@ -180,7 +180,7 @@ Polar::Polar()
+
+ #define MAX_WINDSPEEDS_IN_TABLE 200
+ #define MESSAGE(S) (S + wxString(_T("\n")) + wxString::FromUTF8(filename) \
+- + (line > 0 ? (_(" line ") + wxString::Format(_T("%d"), linenum)) : _T("")))
++ + (linenum > 0 ? (_(" line ") + wxString::Format(_T("%d"), linenum)) : _T("")))
+ #define PARSE_WARNING(S) do { if(message.empty()) message = MESSAGE(S); } while (0)
+ #define PARSE_ERROR(S) if(message.empty()) do { message = _("Boat polar failed") + wxString(_T("\n")) \
+ + MESSAGE(S); goto failed; } while (0)