I don't have much experience with glsl yet and I've run into a problem I can't figure out.
I have an array that contains 4 integer values for each vertex of my mesh.
Since these values never change, I figured the best way of doing it would be by using a buffer.
Below isn't the actual code, just a representation.
Generating the buffer(C++):
Code :
int numValues = vertexCount *4;
int *values = new int[numValues];
for(int i=0;i<numValues;i++)
{
	values[i] = 0; // For testing purposes
}
GLuint buf;
glGenBuffers(1,&buf);
glBindBuffer(GL_ARRAY_BUFFER,buf);
glBufferData(GL_ARRAY_BUFFER,numValues *sizeof(int),&values[0],GL_STATIC_DRAW);
delete values;
When I retrieve the values using glGetBufferSubData they're correct, so I'm assuming so far it's fine.

Inside the shader(GLSL):
Code :
layout(location = 3) in int values[4];

Passing the buffer(C++):
Code :
glEnableVertexAttribArray(3);
glBindBuffer(GL_ARRAY_BUFFER,buf);
glVertexAttribPointer(
	3, // location inside the shader
	4, // 4 integer values per vertex
	GL_INT,
	GL_FALSE,
	0,
	(void*)0
);
glDrawArrays(GL_TRIANGLES,0,vertexCount);
glDisableVertexAttribArray(3);

However, as far as I can tell, the values inside the 'values' array in the shader are incorrect.
I wouldn't be surprised if I did this entirely wrong, although it looks fine to me.
Any suggestions?