First of all, when convolving 2 sequences of length M and L the output sequence has length M+L-1. Here is an example of convolving two sequences in C:
Code:
for (n = 0; n < L+M; n++)
{
    y[n] = 0;
    for (m = max(0, n-L+1); m <= min(n, M); m++)
        y[n] += h[m] * x[n-m];
}
Anyway, why you think that your result is not correct? Give an example if possible.

Regards,
Theodore