@yyp I don't do C (usually) but...

- ... this is fairly easy to follow.
- ... those test cases don't actually assert that it's working apart from not returning NULL, right?

@iooioio Yes, those tests don't do anything related to testing (asserting non-NULL is to ensure I have enough memory to handle those strings), I just added them to visually see if the calculations are right.

Proper tests would look like this: paste.sr.ht/~yerinalexey/055e7

@yyp Ah yes, that looks more like what I was expecting.

Sign in to participate in the conversation

Fosstodon is an English speaking Mastodon instance that is open to anyone who is interested in technology; particularly free & open source software.