hpcu: eliminate infinite looping

This commit is contained in:
Přemysl Eric Janouch 2019-02-04 09:27:10 +01:00
parent e7ea35f304
commit 95f183aa48
Signed by: p
GPG Key ID: A0420B94F92B9493
1 changed files with 1 additions and 1 deletions

View File

@ -92,7 +92,7 @@ func getProperty(window xproto.Window, property xproto.Atom) (
// chunking the requests. This has a cost of losing atomicity, although
// it shouldn't pose a problem except for timeout-caused INCR races.
var result xproto.GetPropertyReply
for result.Length == 0 || result.BytesAfter > 0 {
for (result.Sequence == 0 && result.Length == 0) || result.BytesAfter > 0 {
reply, err := xproto.GetProperty(X, false, /* delete */
window, property, xproto.GetPropertyTypeAny,
uint32(len(result.Value))/4,