mirror of
https://github.com/corda/corda.git
synced 2025-01-08 14:03:06 +00:00
ignore case when looking for Main-Class manifest attribute
Per the spec, attribute names should be case-insensitive: http://docs.oracle.com/javase/6/docs/technotes/guides/jar/jar.html
This commit is contained in:
parent
021590af05
commit
5a7c78e71a
@ -114,8 +114,8 @@ mainClass(const char* jar)
|
|||||||
unsigned length;
|
unsigned length;
|
||||||
while (readLine(region->start(), region->length(), &start, &length)) {
|
while (readLine(region->start(), region->length(), &start, &length)) {
|
||||||
const unsigned PrefixLength = 12;
|
const unsigned PrefixLength = 12;
|
||||||
if (strncmp("Main-Class: ", reinterpret_cast<const char*>
|
if (strncasecmp("Main-Class: ", reinterpret_cast<const char*>
|
||||||
(region->start() + start), PrefixLength) == 0)
|
(region->start() + start), PrefixLength) == 0)
|
||||||
{
|
{
|
||||||
result = static_cast<char*>(malloc(length + 1 - PrefixLength));
|
result = static_cast<char*>(malloc(length + 1 - PrefixLength));
|
||||||
memcpy(result, region->start() + start + PrefixLength,
|
memcpy(result, region->start() + start + PrefixLength,
|
||||||
|
Loading…
Reference in New Issue
Block a user