On a complete nonsingular curve over an algebraically closed field, a line bundle of degree zero with a global section is necessarily the trivial bundle. This is lemma IV.1.2 in Hartshorne's Algebraic Geometry: if $\mathrm{deg} D = 0$ and $\mathcal{L} = O_C(D)$ has a global section, then $D$ is linearly equivalent to an effective divisor $E$ of the same degree; but the only effective divisor of degree zero is the zero divisor. Hence $\mathcal{L} \cong \mathcal{O}_C(E) = \mathcal{O}_C$.