Skip to content

Commit 5d4e181

Browse files
committed
fix stupid in launchdf
1 parent de7fa49 commit 5d4e181

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

package/launchdf.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -362,7 +362,7 @@ int main(int argc, char* argv[]) {
362362
if (bytes <= 0)
363363
return std::nullopt;
364364
// steam API includes one or more null terminators after the path, so trim those off
365-
while (bytes && buf[bytes] == '\0') bytes--;
365+
for (; bytes > 0 && buf[bytes-1] == '\0'; bytes--);
366366
return std::string(buf, bytes);
367367
};
368368

0 commit comments

Comments
 (0)