+ if (src_value_bytes > dst.field->n_bytes) {
+ /* The destination field is an odd number of bytes, which
+ * got rounded up to a multiple of 2 to be put into the
+ * learning action. Skip over the leading byte, which
+ * should be zero anyway. Otherwise the memcpy() below
+ * will overrun the start of 'value'. */
+ int diff = src_value_bytes - dst.field->n_bytes;
+ src_value += diff;
+ src_value_bytes -= diff;
+ }
+