Index: common/stream.cpp
===================================================================
--- common/stream.cpp	(Revision 39130)
+++ common/stream.cpp	(Arbeitskopie)
@@ -68,8 +68,8 @@
 	switch (whence) {
 	case SEEK_END:
 		// SEEK_END works just like SEEK_SET, only 'reversed',
-		// i.e. from the end.
-		offs = _size - offs;
+		// i.e. from the end (Note: offs is negative).
+		offs = _size + offs;
 		// Fall through
 	case SEEK_SET:
 		_ptr = _ptrOrig + offs;
@@ -204,7 +204,7 @@
 
 	switch(whence) {
 	case SEEK_END:
-		offset = size() - offset;
+		offset = size() + offset;
 		// fallthrough
 	case SEEK_SET:
 		_pos = _begin + offset;
