We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent de7fa49 commit 5d4e181Copy full SHA for 5d4e181
1 file changed
package/launchdf.cpp
@@ -362,7 +362,7 @@ int main(int argc, char* argv[]) {
362
if (bytes <= 0)
363
return std::nullopt;
364
// steam API includes one or more null terminators after the path, so trim those off
365
- while (bytes && buf[bytes] == '\0') bytes--;
+ for (; bytes > 0 && buf[bytes-1] == '\0'; bytes--);
366
return std::string(buf, bytes);
367
};
368
0 commit comments