Skip to content

Commit bafc832

Browse files
committed
more aggressive traiiling null trimming
seems to be needed on Steam Deck
1 parent 6882002 commit bafc832

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
@@ -357,7 +357,7 @@ int main(int argc, char* argv[]) {
357357
if (bytes <= 0)
358358
return std::nullopt;
359359
// steam API counts the null terminator in the byte count returned
360-
if (buf[bytes] == '\0') bytes--;
360+
while (bytes && buf[bytes] == '\0') bytes--;
361361
return std::string(buf, bytes);
362362
};
363363

0 commit comments

Comments
 (0)