fix scm_array_handle_ref signedness fix
authorAndy Wingo <wingo@pobox.com>
Thu, 15 Oct 2009 13:44:45 +0000 (15:44 +0200)
committerAndy Wingo <wingo@pobox.com>
Thu, 15 Oct 2009 13:44:45 +0000 (15:44 +0200)
* libguile/inline.h: Fix signedness fix.

libguile/inline.h

index a8f24d4..eaa7494 100644 (file)
@@ -243,7 +243,7 @@ SCM_C_EXTERN_INLINE
 SCM
 scm_array_handle_ref (scm_t_array_handle *h, ssize_t p)
 {
-  if (SCM_UNLIKELY (p < 0 && -p > (ssize_t) h->base))
+  if (SCM_UNLIKELY (p < 0 && ((size_t)-p) > h->base))
     /* catch overflow */
     scm_out_of_range (NULL, scm_from_ssize_t (p));
   /* perhaps should catch overflow here too */