Adamcake / Bolt

An alternative launcher for your favourite MMO
GNU Affero General Public License v3.0
122 stars 18 forks source link

add JAVA_HOME check for posix window launcher #25

Closed agwhitaker93 closed 4 months ago

agwhitaker93 commented 4 months ago

Adds a check to see if the file $JAVA_HOME/bin/java exists in the posix HDOS and Runelite launcher functions, using std::filesystem::exists

The error message could probably be better, but this is what it currently looks like: Screenshot_20240222_015614

Adamcake commented 4 months ago

In the second commit, 100 chars isn't enough to hold the message you're printing into it, so you're writing to undefined memory. Consider PATH_MAX as a buffer size and using snprintf instead of sprintf to limit the write length.