]> git.eshelyaron.com Git - emacs.git/commitdiff
* src/android.c (android_query_tree): Correctly return children.
authorPo Lu <luangruo@yahoo.com>
Fri, 30 Jun 2023 08:20:02 +0000 (16:20 +0800)
committerPo Lu <luangruo@yahoo.com>
Fri, 30 Jun 2023 08:20:02 +0000 (16:20 +0800)
src/android.c

index da5e8da3be12a173ee43bb25e3d4d953397df142..2a2d134c3c8e4c23896f07800f89d8f3b0c52bcb 100644 (file)
@@ -5631,7 +5631,9 @@ android_query_tree (android_window handle, android_window *root_return,
   android_exception_check_nonnull (shorts, array);
 
   for (i = 1; i < nelements; ++i)
-    children[i] = shorts[i];
+    /* Subtract one from the index into children, since the parent is
+       not included.  */
+    children[i - 1] = shorts[i];
 
   /* Finally, return the parent and other values.  */
   *root_return = 0;