mirror of
https://github.com/brl/mutter.git
synced 2024-11-21 23:50:41 -05:00
Number of strings we are processing is one more than required.
2003-07-29 Arvind Samptur <arvind.samptur@wipro.com> * src/xprops.c (utf8_list_from_results): Number of strings we are processing is one more than required. Also get the string count right even without a null byte at the end. Pointed out by Havoc.
This commit is contained in:
parent
5558451c11
commit
fb5f3f6bb0
@ -1,3 +1,11 @@
|
||||
2003-07-29 Arvind Samptur <arvind.samptur@wipro.com>
|
||||
|
||||
* src/xprops.c (utf8_list_from_results): Number of
|
||||
strings we are processing is one more than required.
|
||||
|
||||
Also get the string count right even without a null byte at the end.
|
||||
Pointed out by Havoc.
|
||||
|
||||
2003-07-27 Rob Adams <robadams@ucla.edu>
|
||||
|
||||
* src/window.c (update_move): Update window shaking loose so that
|
||||
|
@ -451,7 +451,7 @@ utf8_list_from_results (GetPropertyResults *results,
|
||||
* property is nul-separated
|
||||
*/
|
||||
i = 0;
|
||||
n_strings = 1;
|
||||
n_strings = 0;
|
||||
while (i < (int) results->n_items)
|
||||
{
|
||||
if (results->prop[i] == '\0')
|
||||
@ -459,6 +459,9 @@ utf8_list_from_results (GetPropertyResults *results,
|
||||
++i;
|
||||
}
|
||||
|
||||
if (results->prop[results->n_items - 1] != '\0')
|
||||
++n_strings;
|
||||
|
||||
/* we're guaranteed that results->prop has a nul on the end
|
||||
* by XGetWindowProperty
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user