I'm experiencing a segfault when recursing a pointer function.
#include <stdio.h>
int func(int(*function)()) {
(*function)();
func(function);
};
int function() {
};
int main() {
func(function);
};
When compiled and executed, the recursive function calls last for a few cycles and then throw a segfault. Any ideas on how to fix this?