COMPMID-556: A tensor cannot be of dimension 0

It should always be at least 1.

Change-Id: I5b9012a227ccd28c20baf2dce84e8a2be3bd789c
Reviewed-on: http://mpd-gerrit.cambridge.arm.com/90746
Tested-by: Kaizen <jeremy.johnson+kaizengerrit@arm.com>
Reviewed-by: Anthony Barbier <anthony.barbier@arm.com>
diff --git a/arm_compute/core/TensorShape.h b/arm_compute/core/TensorShape.h
index 8d15c50..3b395e7 100644
--- a/arm_compute/core/TensorShape.h
+++ b/arm_compute/core/TensorShape.h
@@ -164,7 +164,7 @@
     /** Remove trailing dimensions of size 1 from the reported number of dimensions. */
     void apply_dimension_correction()
     {
-        for(int i = static_cast<int>(_num_dimensions) - 1; i >= 0; --i)
+        for(int i = static_cast<int>(_num_dimensions) - 1; i > 0; --i)
         {
             if(_id[i] == 1)
             {