Review the code snippet before inserting it on your project.
Guint FoFiBase::getUVarBE(int pos, int size, GBool *ok) { Guint x; int i; if (pos < 0 || pos + size > len) { *ok = gFalse; return 0; } x = 0; for (i = 0; i < size; ++i) { x = (x << 8) + file[pos + i]; } return x; }
With from Barcelona