mirror of
https://github.com/clearlinux/graphene.git
synced 2026-09-06 13:51:28 +00:00
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`.
14 lines
311 B
C
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);
|
|
}
|