[RTL]
authorTimo Kreuzer <timo.kreuzer@reactos.org>
Wed, 20 Jan 2010 23:34:21 +0000 (23:34 +0000)
committerTimo Kreuzer <timo.kreuzer@reactos.org>
Wed, 20 Jan 2010 23:34:21 +0000 (23:34 +0000)
Fix a bug in RtlFindNextForwardRunSet, that was returning the wrong bit position. Found by Amine Khaldi.

svn path=/trunk/; revision=45167

reactos/lib/rtl/bitmap.c

index 2732836..c0aef4f 100644 (file)
@@ -600,7 +600,7 @@ RtlFindNextForwardRunSet(
 
     /* Assume a clear run first, count it's length */
     Length = RtlpGetLengthOfRunClear(BitMapHeader, FromIndex, MAXULONG);
-    *StartingRunIndex = FromIndex;
+    *StartingRunIndex = FromIndex + Length;
 
     /* Now return the length of the run */
     return RtlpGetLengthOfRunSet(BitMapHeader, FromIndex, MAXULONG);