Can't compile after upgrading to 4.17, syntax error in gen.cpp

This seems like a much less obnoxious solution than mine, thanks for the tip