- fix overflow condition
[oweals/gnunet.git] / src / mesh / mesh_api.c
index fe600e37c79871af773196eab93762e3d7364a5c..b9ac8f94d17aeff378275408dd623d5f1fe7cc11 100644 (file)
@@ -396,7 +396,7 @@ message_ready_size (struct GNUNET_MESH_Handle *h)
   {
     t = th->tunnel;
     if (GNUNET_NO == th_is_payload (th) ||
-        (t->max_pid > t->pid || PID_OVERFLOW (t->max_pid, t->pid)))
+        (t->max_pid > t->pid || PID_OVERFLOW (t->pid, t->max_pid)))
       return th->size;
   }
   return 0;