Removal of old code and add size check to a condition; minor README edit

This commit is contained in:
_ 2020-11-29 00:47:11 -07:00
parent 1492230456
commit 8545596781
2 changed files with 2 additions and 10 deletions

View File

@ -22,7 +22,7 @@ Crossed out items support key dumping but not automatic downloading
## Using
1. Make sure `SpotifyKeyDumperInjector.exe` and `SpotifyKeyDumper.dll` are located in the same folder as Spotify (`Spotify.exe`).
2. Start SpotifyKeyDumperInjector either before or after launching Spotify.
2. Start SpotifyKeyDumperInjector before launching Spotify.
## Building
This project uses C++14 on Visual Studio 2019

View File

@ -87,14 +87,6 @@ std::string Utils::HexString(BYTE* data, int len)
return ss.str();
}
bool IsEqualIgnoreCase(const std::string& stringOne, const std::string& stringTwo)
{
return std::equal(stringOne.begin(), stringOne.end(), stringTwo.begin(), [](char a, char b)
{
return tolower(a) == tolower(b);
});
}
std::wstring Utils::FixPathStr(std::wstring str)
{
// No forbidden characters
@ -160,7 +152,7 @@ void Utils::DownloadSong(std::string fileId, std::string trackUri, std::string k
// Download encrypted song data from Spotify
std::string songStr = DownloadSpotifyUrl(songHost, songPath, "");
if (songStr.substr(0, 6).compare("<HTML>") == 0)
if (songStr.length() > 6 && songStr.substr(0, 6).compare("<HTML>") == 0)
{
std::cout << "Error: " + songStr << std::endl;
return;