Commit 368739dc authored by Tom Lane's avatar Tom Lane

Fix bogus assumption that sizeof() produces an int-sized result.

parent 577247b0
......@@ -82,10 +82,10 @@ gtsvector_out(PG_FUNCTION_ARGS)
outbuf = palloc( outbuf_maxlen );
if ( ISARRKEY(key) )
sprintf( outbuf, ARROUTSTR, ARRNELEM(key) );
sprintf( outbuf, ARROUTSTR, (int) ARRNELEM(key) );
else {
int cnttrue = ( ISALLTRUE(key) ) ? SIGLENBIT : sizebitvec(GETSIGN(key));
sprintf( outbuf, SINGOUTSTR, cnttrue, SIGLENBIT - cnttrue );
sprintf( outbuf, SINGOUTSTR, cnttrue, (int) SIGLENBIT - cnttrue );
}
PG_FREE_IF_COPY(key,0);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment