2 ms·
Nice! Suggestion: you could probably use `asprintf` to malloc the input expression string and use the Stopif variadic macro to return an error if the input tak
by agentultra 11y ago
Nice!
Suggestion: you could probably use `asprintf` to malloc the input expression string and use the Stopif variadic macro to return an error if the input takes up more than the available memory. Unless of course your target platform doesn't have the GNU libraries in which case you could write a test macro and insert your own implementation using `vsnprintf`. :)
You might also want to check your input lengths for reasonable size before allocating memory for them.
My first stop learning a new language is usually a project like this or a guess-the-number game. I hope it's been helpful to you.