- res = make_string (XSTRING (string)->data + XINT (from),
- XINT (to) - XINT (from));
- copy_text_properties (from, to, string, make_number (0), res, Qnil);
+ if (STRINGP (string))
+ {
+ res = make_string (XSTRING (string)->data + XINT (from),
+ XINT (to) - XINT (from));
+ copy_text_properties (from, to, string, make_number (0), res, Qnil);
+ }
+ else
+ res = Fvector (XINT (to) - XINT (from),
+ XVECTOR (string)->contents + XINT (from));
+