[BTRFS][UBTRFS][SHELLBTRFS] Upgrade to 1.7.6 (#4417)
[reactos.git] / drivers / filesystems / btrfs / security.c
index 2761c63..c1183de 100644 (file)
@@ -95,7 +95,7 @@ void add_user_mapping(WCHAR* sidstring, ULONG sidstringlength, uint32_t uid) {
     while (sidstringlength > 0) {
         val = 0;
         i = 0;
-        while (sidstring[i] != '-' && i < sidstringlength) {
+        while (i < sidstringlength && sidstring[i] != '-') {
             if (sidstring[i] >= '0' && sidstring[i] <= '9') {
                 val *= 10;
                 val += sidstring[i] - '0';