Index: trunk/BNC/src/t_prn.cpp
===================================================================
--- trunk/BNC/src/t_prn.cpp	(revision 10791)
+++ trunk/BNC/src/t_prn.cpp	(revision 11047)
@@ -53,4 +53,22 @@
 //////////////////////////////////////////////////////////////////////////////
 int t_prn::toInt() const {
+  // Every per-satellite array (size MAXPRN+1) and every map keyed by t_prn
+  // (compared via operator unsigned) relies on this index. A number beyond
+  // its system's range - e.g. a 6-bit SSR satellite ID up to 63 - would
+  // otherwise silently map onto a satellite of the next system (G33 = R01)
+  // or beyond the arrays, so it is mapped to the unused index 0 instead.
+  unsigned maxNum = 0;
+  switch (_system) {
+    case 'G': maxNum = MAXPRN_GPS;     break;
+    case 'R': maxNum = MAXPRN_GLONASS; break;
+    case 'E': maxNum = MAXPRN_GALILEO; break;
+    case 'J': maxNum = MAXPRN_QZSS;    break;
+    case 'S': maxNum = MAXPRN_SBAS;    break;
+    case 'C': maxNum = MAXPRN_BDS;     break;
+    case 'I': maxNum = MAXPRN_NavIC;   break;
+  }
+  if (_number < 1 || unsigned(_number) > maxNum) {
+    return 0;
+  }
   if      (_system == 'G') {
     return _number;
