Firebird appears to pad the short as if it was a full int. If the stored value was '1' then the old conversion will return '0', as the raw_value array is [0 0 0 1].
Reference: http://sourceforge.net/p/firebird/code/HEAD/tree/client-java/trunk/src/main/org/firebirdsql/gds/XSQLVAR.java#l171