Open dkadish opened 5 years ago
Yup, the documentation is correct. The code is wrong. It would seem that the return code is never checked anywhere in the code.
Ahh, got it. I'm working on a Python port of this (I'll post a link once I have something rough working), so I'm going over the code pretty closely. I'll let you know if I see anything else!
Wow! Good luck. This code is quite a mess, as I was mostly trying to translate the core of Pink Trombone JS to ANSI C. So sorry about that. It could use a rewrite or two, so I'm happy to see someone trying to tackle a rewrite in another language. Personally, I've been meaning to try to make a version of this (or portions of it) in FAUST. Someday I'll hopefully get to it...
If you make a PR with this fix, I'll be happy to merge it.
https://github.com/PaulBatchelor/voc/blob/20a17d66b178d1e05b8e3d96c61f6f22e79fb1f6/tract.w#L413
Documentation states that append_transient should return 1 on success, but the function as written will never return 1. I think the last statement (line 413) should return 1. Unless I've missed something?