X-Git-Url: http://git.localhorst.tv/?a=blobdiff_plain;f=src%2Frand%2FGaloisLFSR.hpp;h=001173919c1214a6b0931e788f2130c6bdac312f;hb=065bafb23d02edbd99f5bfafe803d8ad75398263;hp=81652d85f54a64cd628c22a95d3493b6de6476cd;hpb=f1f8941a3f682fb589cf3c620fc7e7602cfc0f7f;p=blank.git diff --git a/src/rand/GaloisLFSR.hpp b/src/rand/GaloisLFSR.hpp index 81652d8..0011739 100644 --- a/src/rand/GaloisLFSR.hpp +++ b/src/rand/GaloisLFSR.hpp @@ -63,10 +63,12 @@ public: template typename Container::reference From(Container &c) { + assert(c.size() > 0); return c[Next() % c.size()]; } template typename Container::const_reference From(const Container &c) { + assert(c.size() > 0); return c[Next() % c.size()]; }