From 2bbeb9408b3703d2e4a711c2fff7b0cdbeb547e6 Mon Sep 17 00:00:00 2001 From: Carsten Weisse Date: Wed, 10 Nov 2004 20:35:36 +0000 Subject: this is the right method to get the readable lenght or size (capacity() doesn't work with sliced buffers) --- src/jake2/render/fastjogl/Image.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/jake2/render/fastjogl') diff --git a/src/jake2/render/fastjogl/Image.java b/src/jake2/render/fastjogl/Image.java index 77ab6e2..48c206a 100644 --- a/src/jake2/render/fastjogl/Image.java +++ b/src/jake2/render/fastjogl/Image.java @@ -2,7 +2,7 @@ * Image.java * Copyright (C) 2003 * - * $Id: Image.java,v 1.7 2004-10-20 19:20:14 cawe Exp $ + * $Id: Image.java,v 1.8 2004-11-10 20:35:36 cawe Exp $ */ /* Copyright (C) 1997-2001 Id Software, Inc. @@ -463,7 +463,7 @@ public abstract class Image extends Main { if (palette != null) { palette[0] = new byte[768]; - raw.position(raw.capacity() - 768); + raw.position(raw.limit() - 768); raw.get(palette[0]); } -- cgit v1.2.3