Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
oh, indeed.... haha
I always overlook things the first time. haha
Oh, I just realized you're the guy who approved it. Haha. Thanks for all the help, again!
Cool! I learned more about cmov after I wrote this like a week ago.
Nice to see we got similar answers, and how I could have used cmov here!
Changed
ssize_t
toint
everywhere.Why
ssize_t
if0 < n < 1e6
and it has nothing to do with size?Approved
Macro parameters are not real variables. They are just textual values which will be inserted into the macro body during the macro expansion phase. So we need to create a proper variable to ensure that the type of the input parameter is correct.
Updated!
So basically reassigning the macro'd variables to their proper types?
The
tester
macro should be updated:The current version has two issues (which I didn't notice before):
-1
is printed as4294967295
.This was an accident.
Alright. I think I did it. Sorry, I messed up and I think I published a c fork on accident.
Edit: okay I fixed the accidental publish, too, I think.
edit2: this might help: New NASM Translation
Sorry, I didn't see this! I will give that a shot!
Duplicate issue below
I realized if I dec rbp when it's an empty string, I write to memory that's before the string, which is bad.
I could have solved this with starting the string one byte forward, since I have 4x the string length to work with, but figured it would be best to just do another check and return an empty string without modifying memory outside the string.
Loading more items...