I have the following latex code:
\documentclass{beamer}
\usetheme{Frankfurt}
\usepackage{listings}
\lstset{
basicstyle = \linespread{1}\ttfamily,
breaklines=true,
postbreak=\raisebox{0ex}[0ex][0ex]{\ensuremath{\color{red}\hookrightarrow\space}},
}
\begin{document}
\begin{frame}[fragile]{Title}
\begin{lstlisting}
Really really really really really really long line
next line
\end{lstlisting}
\end{frame}
\end{document}
This works only if I comment out the postbreak, but if I leave it in, I get 162(!) errors. Some of these are "Missing number, treated as zero.", "Illegal unit of measure (pt inserted).", and "Missing = inserted for \ifnum.".
If I remove 'long line' from the first line, it suddenly works, albeit with many errors.
I am so confused and have no clue what's going on. Could I get some help? Thanks!

instead, it works, but anything bigger than 5 doesn't. Even with the shortened code, there's still over 100 errors.
– Biggly Bobb Nov 15 '20 at 12:57