Update next-spt.cpp