Files
borysp 9cd6b34747 [Pal] Change the way argv[0] is handled
Before argv[0] was treated specially and was changed to a value
from manifest file. Now this happens only if binary was run as
a manifest i.e. `./pal_loader path_to_manifest_file`.
2019-09-25 19:16:48 +02:00

14 lines
311 B
C

#include <api.h>
bool strendswith(const char* haystack, const char* needle) {
size_t haystack_len = strlen(haystack);
size_t needle_len = strlen(needle);
if (haystack_len < needle_len) {
return false;
}
return !memcmp(&haystack[haystack_len - needle_len], needle, needle_len);
}