提交 368739dc 编写于 作者: T Tom Lane

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

上级 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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册