$NetBSD: patch-ag,v 1.1 2008/07/27 20:14:14 dholland Exp $ --- usecode/useval.cc~ 2004-05-23 01:07:11.000000000 -0400 +++ usecode/useval.cc 2008-07-27 14:20:59.000000000 -0400 @@ -464,7 +464,8 @@ if (buflen < 5) return -1; *ptr++ = type; - Write4(ptr, (int)value.ptr); + /* this may truncate the pointer! */ + Write4(ptr, (int32_t)(intptr_t)value.ptr); break; case string_type: {