Foone🏳️⚧️ on Nostr: 99% sure it's bugged. so if you have a file like this one which has the following ...
99% sure it's bugged.
so if you have a file like this one which has the following chunks:
* NFNT 200
* NFNT 300
* NFNT 15000
* TEXT 128
* TEXT 129
* TEXT 130
You call the FindFileResource("NFNT", 128" and it'll check that the first node is an NFNT (it is) and then it'll end up matching the TEXT 128, because the chunk-type check is outside the loop
similarly FindFileResource("TEXT",130) will fail, because the first chunk isn't TEXT
so if you have a file like this one which has the following chunks:
* NFNT 200
* NFNT 300
* NFNT 15000
* TEXT 128
* TEXT 129
* TEXT 130
You call the FindFileResource("NFNT", 128" and it'll check that the first node is an NFNT (it is) and then it'll end up matching the TEXT 128, because the chunk-type check is outside the loop
similarly FindFileResource("TEXT",130) will fail, because the first chunk isn't TEXT