diff options
Diffstat (limited to 'src/xselect.c')
| -rw-r--r-- | src/xselect.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/xselect.c b/src/xselect.c index 73ef4abc0a4..ca2b1812a61 100644 --- a/src/xselect.c +++ b/src/xselect.c | |||
| @@ -1651,9 +1651,9 @@ selection_data_to_lisp_data (Display *display, const unsigned char *data, | |||
| 1651 | If the number is 32 bits and won't fit in a Lisp_Int, | 1651 | If the number is 32 bits and won't fit in a Lisp_Int, |
| 1652 | convert it to a cons of integers, 16 bits in each half. | 1652 | convert it to a cons of integers, 16 bits in each half. |
| 1653 | */ | 1653 | */ |
| 1654 | else if (format == 32 && size == sizeof (int)) | 1654 | else if (format == 32 && size == sizeof (unsigned int)) |
| 1655 | return long_to_cons (((unsigned int *) data) [0]); | 1655 | return long_to_cons (((unsigned int *) data) [0]); |
| 1656 | else if (format == 16 && size == sizeof (short)) | 1656 | else if (format == 16 && size == sizeof (unsigned short)) |
| 1657 | return make_number ((int) (((unsigned short *) data) [0])); | 1657 | return make_number ((int) (((unsigned short *) data) [0])); |
| 1658 | 1658 | ||
| 1659 | /* Convert any other kind of data to a vector of numbers, represented | 1659 | /* Convert any other kind of data to a vector of numbers, represented |
| @@ -1753,8 +1753,8 @@ lisp_data_to_selection_data (Display *display, Lisp_Object obj, | |||
| 1753 | { | 1753 | { |
| 1754 | *format_ret = 32; | 1754 | *format_ret = 32; |
| 1755 | *size_ret = 1; | 1755 | *size_ret = 1; |
| 1756 | *data_ret = (unsigned char *) xmalloc (sizeof (long) + 1); | 1756 | *data_ret = (unsigned char *) xmalloc (sizeof (unsigned long) + 1); |
| 1757 | (*data_ret) [sizeof (long)] = 0; | 1757 | (*data_ret) [sizeof (unsigned long)] = 0; |
| 1758 | (*(unsigned long **) data_ret) [0] = cons_to_long (obj); | 1758 | (*(unsigned long **) data_ret) [0] = cons_to_long (obj); |
| 1759 | if (NILP (type)) type = QINTEGER; | 1759 | if (NILP (type)) type = QINTEGER; |
| 1760 | } | 1760 | } |