Skip to content

algo: fix maxAlphabetSize being larger than 26 becoming a segfault

Filip Gregor requested to merge add-alphabet-size-limit into master

There is currently a bug that causes a segfault if maxAlphabetSize is larger than 26 (english alphabet). For example, following command in repl will cause a segfault tree::generate::RandomRankedTreeFactory 4 5 27 1 10, but tree::generate::RandomRankedTreeFactory 4 5 26 1 10 will execute fine.

Fixed to throw common exception if the size is exceeded.

Merge request reports

Loading