diff --git a/src/modules/Odbc/odbc_result.c b/src/modules/Odbc/odbc_result.c
index 7b0a03272f189f1ffb45adeb639c3f62176c6765..f2309a3df70ec1895003e9a8e16dfc14e15ac521 100644
--- a/src/modules/Odbc/odbc_result.c
+++ b/src/modules/Odbc/odbc_result.c
@@ -2,7 +2,7 @@
 || This file is part of Pike. For copyright information see COPYRIGHT.
 || Pike is distributed under GPL, LGPL and MPL. See the file COPYING
 || for more information.
-|| $Id: odbc_result.c,v 1.49 2006/07/04 11:10:55 grubba Exp $
+|| $Id: odbc_result.c,v 1.50 2006/08/05 22:20:41 mast Exp $
 */
 
 /*
@@ -577,12 +577,13 @@ static void f_fetch_row(INT32 args)
 #endif
 	    } else {
 	      /* Truncated, but no support for chained SQLGetData calls. */
-	      char *buf = xalloc((len+2)
+	      char *buf;
+	      SQLLEN newlen = 0;
 #ifdef SQL_WCHAR
-				 * sizeof(SQLWCHAR)
+	      buf = xalloc((len+2) * sizeof(SQLWCHAR));
+#else
+	      buf = xalloc(len+2);
 #endif
-				 );
-	      SQLLEN newlen = 0;
 	      code = SQLGetData(PIKE_ODBC_RES->hstmt, (SQLUSMALLINT)(i+1),
 				PIKE_ODBC_RES->field_info[i].type,
 				buf, (len+1)