diff --git a/src/wrap_cl.hpp b/src/wrap_cl.hpp
index 9fcea1f67d6771356140f99560d11e5d0b8fe2ce..425bf1d659ec344e40d6af974f56dc3af63dd4cb 100644
--- a/src/wrap_cl.hpp
+++ b/src/wrap_cl.hpp
@@ -93,7 +93,7 @@
 #if defined(_WIN32)
 // MSVC does not understand variable-length arrays
 #define PYOPENCL_STACK_CONTAINER(TYPE, NAME, COUNT) std::vector<TYPE> NAME(COUNT)
-#define PYOPENCL_STACK_CONTAINER_GET_PTR(NAME) (name.size() ? name.data() : nullptr)
+#define PYOPENCL_STACK_CONTAINER_GET_PTR(NAME) (NAME.size() ? NAME.data() : nullptr)
 #else
 // gcc et al complain about stripping attributes in template arguments
 #define PYOPENCL_STACK_CONTAINER(TYPE, NAME, COUNT) TYPE NAME[COUNT]