/* Fetch an array of SHORT or SSHORT values.  */
static int TIFFFetchShortArray(TIFF *, TIFFDirEntry *, uint16 *)
/* Fetch an array of SHORT or SSHORT values.  */
static int TIFFFetchShortArray(TIFF *, TIFFDirEntry *, uint16 *)
{
	if (dir->tdir_count <= 2) {
		if (tif->tif_header.tiff_magic == TIFF_BIGENDIAN) {
			switch (dir->tdir_count) {
			case 2: v[1] = dir->tdir_offset & 0xffff;
			case 1: v[0] = dir->tdir_offset >> 16;
			}
		} else {
			switch (dir->tdir_count) {
			case 2: v[1] = dir->tdir_offset >> 16;
			case 1: v[0] = dir->tdir_offset & 0xffff;
			}
		}
		return (1);
	} else
		return (TIFFFetchData(tif, dir, (char *)v) != 0);
}