-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fails clap-validator test #38
Comments
Oh this was written well before the validator and i never bothered to run it! Funny. That change looks correct to me. Would you like to send a PR? Thanks so much. |
What is a PR? Its just that line of code. BTW the clap sdk has been updated
since then. clap_track_info for example has some different fields. But I
just used your version so it was fine.
…On Tue, Nov 21, 2023 at 3:56 PM Paul ***@***.***> wrote:
Oh this was written well before the validator and i never bothered to run
it! Funny.
That change looks correct to me. Would you like to send a PR?
Thanks so much.
—
Reply to this email directly, view it on GitHub
<#38 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AFPT6VDIF2MDFOCGTTAFLDDYFSXKJAVCNFSM6AAAAAA7UOJIMOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMRQHE3TIMZQGE>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
PR == "pull request" - how you send a change when collaborating on GitHub But no worries - if you haven't done it I can add the fix also! Just it will then have my authorship not yours (which is fine) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The demo fails the clap-validator test.
I added this snippet to stateLoad
if (totalRd == 0) return false;
After this loop. Not sure it is a correct fix but it makes the clap-validator succeed. The reason it failed is because you must return false if an empty state is passed, so that might mean you also need to clear existing settings or something. Not sure? Just testing...
Thanks for making this demo. Makes it real easy to understand and implement clap.
buffer[0] = 0;
while ((rd = stream->read(stream, bp, chunkSize)) > 0)
{
bp += rd;
totalRd += rd;
if (totalRd >= maxSize - chunkSize - 1)
{
_DBGCOUT << "Invalid stream: Why did you send me so many bytes!" << std::endl;
// What the heck? You sdent me more than 32kb of data for a 700 byte string?
// That means my next chunk read will blow out memory so....
return false;
}
}
if (totalRd == 0) return false;
The text was updated successfully, but these errors were encountered: